16 #ifndef dealii_patterns_h 17 #define dealii_patterns_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/subscriptor.h> 23 #include <deal.II/base/point.h> 24 #include <deal.II/base/subscriptor.h> 25 #include <deal.II/base/utilities.h> 26 #include <deal.II/base/template_constraints.h> 28 #include <deal.II/base/std_cxx14/memory.h> 29 #include <deal.II/base/std_cxx14/algorithm.h> 30 #include <deal.II/base/std_cxx14/utility.h> 32 #include <boost/archive/basic_archive.hpp> 33 #include <boost/core/demangle.hpp> 34 #include <boost/property_tree/ptree_fwd.hpp> 35 #include <boost/property_tree/ptree_serialization.hpp> 36 #include <boost/serialization/split_member.hpp> 45 #include <type_traits> 46 #include <unordered_map> 47 #include <unordered_set> 51 DEAL_II_NAMESPACE_OPEN
85 virtual bool match (
const std::string &test_string)
const = 0;
126 virtual std::unique_ptr<PatternBase>
clone ()
const = 0;
149 std::unique_ptr<PatternBase>
pattern_factory (
const std::string &description);
209 virtual bool match (
const std::string &test_string)
const;
223 virtual std::unique_ptr<PatternBase>
clone ()
const;
301 virtual bool match (
const std::string &test_string)
const;
315 virtual std::unique_ptr<PatternBase>
clone ()
const;
371 virtual bool match (
const std::string &test_string)
const;
385 virtual std::unique_ptr<PatternBase>
clone ()
const;
464 virtual bool match (
const std::string &test_string)
const;
477 virtual std::unique_ptr<PatternBase>
clone ()
const;
502 <<
"The values " << arg1 <<
" and " << arg2
503 <<
" do not form a valid range.");
581 virtual bool match (
const std::string &test_string)
const;
594 virtual std::unique_ptr<PatternBase>
clone ()
const;
639 <<
"The values " << arg1 <<
" and " << arg2
640 <<
" do not form a valid range.");
648 std::unique_ptr<PatternBase> value_pattern;
737 Tuple (
const std::vector<std::unique_ptr<PatternBase> > &
patterns,
745 Tuple (
const std::vector<std::unique_ptr<PatternBase> > &
patterns,
756 template<
class... PatternTypes>
767 template<
class... PatternTypes>
788 virtual bool match (
const std::string &test_string)
const;
801 virtual std::unique_ptr<PatternBase>
clone ()
const;
830 std::vector<std::unique_ptr<PatternBase> >
patterns;
866 virtual bool match (
const std::string &test_string)
const;
880 virtual std::unique_ptr<PatternBase>
clone ()
const;
887 static std::unique_ptr<MultipleSelection>
create (
const std::string &
description);
905 <<
"A comma was found at position " << arg1
906 <<
" of your input string, but commas are not allowed here.");
944 virtual std::unique_ptr<PatternBase>
clone ()
const;
976 virtual bool match (
const std::string &test_string)
const;
989 virtual std::unique_ptr<PatternBase>
clone ()
const;
1049 virtual bool match (
const std::string &test_string)
const;
1062 virtual std::unique_ptr<PatternBase>
clone ()
const;
1108 virtual bool match (
const std::string &test_string)
const;
1121 virtual std::unique_ptr<PatternBase>
clone ()
const;
1228 template <
class T,
class Enable =
void>
1240 static std::unique_ptr<Patterns::PatternBase>
to_pattern() =
delete;
1251 static std::string
to_string(
const T &s,
1252 const std::unique_ptr<Patterns::PatternBase>
1263 static T
to_value(
const std::string &s,
1264 const std::unique_ptr<Patterns::PatternBase> &p =
1288 template<
typename T>
1318 template<
typename T>
1319 void to_value(
const std::string &s, T &t);
1332 <<
"The string " << arg1 <<
" does not match the pattern \"" 1343 template<
class... PatternTypes>
1345 const PatternTypes &... ps)
1348 Tuple (
std::string(separator), ps...)
1353 template<
class... PatternTypes>
1355 const PatternTypes &... ps)
1357 separator (separator)
1360 "Not all of the input arguments of this function " 1361 "are derived from PatternBase");
1362 static_assert(
sizeof...(ps) > 0,
1363 "The number of PatternTypes must be greater than zero!");
1364 auto pattern_pointers = { (
static_cast<const PatternBase *
>(&ps))... };
1365 for (
auto p : pattern_pointers)
1371 template<
class... PatternTypes>
1410 template <
class T,
class Enable =
void>
1413 static constexpr
int list_rank = 0;
1414 static constexpr
int map_rank = 0;
1420 struct Convert<T, typename
std::enable_if<std::is_arithmetic<T>::value>::type>
1423 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1425 if (std::is_same<T,bool>::value)
1426 return std_cxx14::make_unique<Patterns::Bool>();
1427 else if (std::is_integral<T>::value)
1428 return std_cxx14::make_unique<Patterns::Integer>(
1429 std::numeric_limits<T>::min(), std::numeric_limits<T>::max());
1430 else if (std::is_floating_point<T>::value)
1431 return std_cxx14::make_unique<Patterns::Double>(
1432 -std::numeric_limits<T>::max(), std::numeric_limits<T>::max());
1439 static std::string
to_string(
const T &value,
1440 const std::unique_ptr<Patterns::PatternBase>
1443 std::stringstream str;
1444 if (std::is_same<T, unsigned char>::value ||
1445 std::is_same<T, signed char>::value ||
1446 std::is_same<T, char>::value)
1448 else if (std::is_same<T,bool>::value)
1449 str << (value ?
"true" :
"false");
1456 static T
to_value(
const std::string &s,
1457 const std::unique_ptr<Patterns::PatternBase> &p =
1462 if (std::is_same<T,bool>::value)
1463 value = (s ==
"true");
1466 std::istringstream is(s);
1467 if (std::is_same<T, unsigned char>::value ||
1468 std::is_same<T, signed char>::value ||
1469 std::is_same<T, char>::value)
1486 "\" to the type \"" +
1487 boost::core::demangle(
typeid(T).name()) +
"\""));
1495 const std::array<std::string, 4> default_list_separator {{
"," ,
";" ,
"|" ,
"%"}};
1496 const std::array<std::string, 4> default_map_separator {{
":" ,
"=" ,
"@" ,
"#"}};
1499 template <
typename T>
struct is_list_compatible : std::false_type {};
1500 template <
typename T, std::
size_t N>
struct is_list_compatible<
std::array <T,N>> : std::true_type {};
1501 template <
typename... Args>
struct is_list_compatible<
std::vector <Args...>> : std::true_type {};
1502 template <
typename... Args>
struct is_list_compatible<
std::deque <Args...>> : std::true_type {};
1503 template <
typename... Args>
struct is_list_compatible<
std::list <Args...>> : std::true_type {};
1504 template <
typename... Args>
struct is_list_compatible<
std::set <Args...>> : std::true_type {};
1505 template <
typename... Args>
struct is_list_compatible<
std::multiset <Args...>> : std::true_type {};
1506 template <
typename... Args>
struct is_list_compatible<
std::unordered_set <Args...>> : std::true_type {};
1507 template <
typename... Args>
struct is_list_compatible<
std::unordered_multiset<Args...>> : std::true_type {};
1509 template <
typename T>
struct is_map_compatible : std::false_type {};
1510 template <
class Key,
class T,
class Compare,
class Allocator>
1511 struct is_map_compatible<
std::map<Key,T,Compare,Allocator>> : std::true_type {};
1512 template <
class Key,
class T,
class Compare,
class Allocator>
1513 struct is_map_compatible<
std::multimap<Key,T,Compare,Allocator>> : std::true_type {};
1514 template <
class Key,
class T,
class Hash,
class KeyEqual,
class Allocator>
1515 struct is_map_compatible<
std::unordered_map<Key,T,Hash,KeyEqual,Allocator>> : std::true_type {};
1516 template <
class Key,
class T,
class Hash,
class KeyEqual,
class Allocator>
1517 struct is_map_compatible<
std::unordered_multimap<Key,T,Hash,KeyEqual,Allocator>> : std::true_type {};
1521 template <
typename T>
1522 struct is_list_compatible
1524 static constexpr
bool const value =
1525 internal::is_list_compatible<typename std::decay<T>::type>::value;
1528 template <
typename T>
1529 struct is_map_compatible
1531 static constexpr
bool const value =
1532 internal::is_map_compatible<typename std::decay<T>::type>::value;
1539 constexpr
int max_list_rank()
1541 return RankInfo<T>::list_rank;
1544 template <
class T1,
class T2,
class... Types>
1545 constexpr
int max_list_rank()
1547 return std_cxx14::max(RankInfo<T1>::list_rank,
1548 max_list_rank<T2,Types...>());
1553 constexpr
int max_map_rank()
1555 return RankInfo<T>::map_rank;
1558 template <
class T1,
class T2,
class... Types>
1559 constexpr
int max_map_rank()
1561 return std_cxx14::max(RankInfo<T1>::map_rank,
1562 max_map_rank<T2,Types...>());
1568 typename
std::enable_if<is_list_compatible<T>::value>::type>
1570 static constexpr
int list_rank =
1571 RankInfo<typename T::value_type>::list_rank + 1;
1572 static constexpr
int map_rank =
1573 RankInfo<typename T::value_type>::map_rank;
1578 struct RankInfo<T, typename
std::enable_if<is_map_compatible<T>::value>::type>
1580 static constexpr
int list_rank =
1581 max_list_rank<typename T::key_type, typename T::mapped_type>() + 1;
1582 static constexpr
int map_rank =
1583 max_map_rank<typename T::key_type, typename T::mapped_type>() + 1;
1587 template <
int rank,
int dim,
class Number>
1588 struct RankInfo<
Tensor<rank, dim, Number>>
1590 static constexpr
int list_rank = rank + RankInfo<Number>::list_rank;
1591 static constexpr
int map_rank = RankInfo<Number>::map_rank;
1594 template <
int dim,
class Number>
1595 struct RankInfo<
Point<dim, Number>> : RankInfo<Tensor<1, dim, Number>>
1600 template <
class Number>
1601 struct RankInfo<
std::complex<Number>>
1603 static constexpr
int list_rank = RankInfo<Number>::list_rank + 1;
1604 static constexpr
int map_rank = RankInfo<Number>::map_rank;
1607 template <
class Key,
class Value>
1608 struct RankInfo<
std::pair<Key,Value>>
1610 static constexpr
int list_rank = std_cxx14::max(RankInfo<Key>::list_rank, RankInfo<Value>::list_rank);
1611 static constexpr
int map_rank = std_cxx14::max(RankInfo<Key>::map_rank, RankInfo<Value>::map_rank)+1;
1615 template <
class... Types>
1616 struct RankInfo<
std::tuple<Types...>>
1618 static constexpr
int list_rank = max_list_rank<Types...>();
1619 static constexpr
int map_rank = max_map_rank<Types...>()+1;
1625 struct Convert<T, typename
std::enable_if<is_list_compatible<T>::value>::type>
1627 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1629 static_assert(internal::RankInfo<T>::list_rank > 0,
1630 "Cannot use this class for non List-compatible types.");
1631 return std_cxx14::make_unique<Patterns::List>(
1634 std::numeric_limits<unsigned int>::max(),
1635 internal::default_list_separator[internal::RankInfo<T>::list_rank - 1]);
1638 static std::string
to_string(
const T &t,
1639 const std::unique_ptr<Patterns::PatternBase>
1644 "string to a List type."));
1645 auto base_p = p->get_base_pattern().clone();
1646 std::vector<std::string> vec(t.size());
1649 for (
const auto &ti : t)
1655 for (
unsigned int i = 1; i < vec.size(); ++i)
1656 s += p->get_separator() +
" " + vec[i];
1662 static T
to_value(
const std::string &s,
1663 const std::unique_ptr<Patterns::PatternBase> &pattern =
1671 "to a List type."));
1673 auto base_p = p->get_base_pattern().clone();
1677 for (
const auto &str : v)
1687 struct Convert<T, typename
std::enable_if<is_map_compatible<T>::value>::type>
1689 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1691 static_assert(internal::RankInfo<T>::list_rank > 0,
1692 "Cannot use this class for non List-compatible types.");
1693 static_assert(internal::RankInfo<T>::map_rank > 0,
1694 "Cannot use this class for non Map-compatible types.");
1695 return std_cxx14::make_unique<Patterns::Map>(
1699 std::numeric_limits<unsigned int>::max(),
1700 internal::default_list_separator[internal::RankInfo<T>::list_rank - 1],
1701 internal::default_map_separator[internal::RankInfo<T>::map_rank - 1]);
1704 static std::string
to_string(
const T &t,
1705 const std::unique_ptr<Patterns::PatternBase>
1708 auto p =
dynamic_cast<const Patterns::Map *
>(pattern.get());
1710 "a Map compatbile type."));
1711 auto key_p = p->get_key_pattern().clone();
1712 auto val_p = p->get_value_pattern().clone();
1713 std::vector<std::string> vec(t.size());
1716 for (
const auto &ti : t)
1719 p->get_key_value_separator() +
1725 for (
unsigned int i = 1; i < vec.size(); ++i)
1726 s += p->get_separator() +
" " + vec[i];
1732 static T
to_value(
const std::string &s,
1733 const std::unique_ptr<Patterns::PatternBase> &pattern =
1739 auto p =
dynamic_cast<const Patterns::Map *
>(pattern.get());
1741 "string to a Map compatible type."));
1743 auto key_p = p->get_key_pattern().clone();
1744 auto val_p = p->get_value_pattern().clone();
1748 for (
const auto &str : v)
1753 t.insert(std::make_pair(
1763 template <
int rank,
int dim,
class Number>
1764 struct Convert<
Tensor<rank, dim, Number>>
1767 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1769 static_assert(internal::RankInfo<T>::list_rank > 0,
1770 "Cannot use this class for non List-compatible types.");
1771 return std_cxx14::make_unique<Patterns::List>(
1775 internal::default_list_separator[internal::RankInfo<T>::list_rank - 1]);
1778 static std::string
to_string(
const T &t,
1779 const std::unique_ptr<Patterns::PatternBase>
1785 "to a List compatbile type."));
1786 auto base_p = p->get_base_pattern().clone();
1787 std::vector<std::string> vec(dim);
1789 for (
unsigned int i = 0; i < dim; ++i)
1795 for (
unsigned int i = 1; i < vec.size(); ++i)
1796 s += p->get_separator() +
" " + vec[i];
1802 static T
to_value(
const std::string &s,
1803 const std::unique_ptr<Patterns::PatternBase> &pattern =
1811 "to a List compatbile type."));
1813 auto base_p = p->get_base_pattern().clone();
1818 for (
const auto &str : v)
1826 template <
int dim,
class Number>
1827 struct Convert<
Point<dim, Number>>
1832 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1837 static std::string
to_string(
const T &t,
1838 const std::unique_ptr<Patterns::PatternBase>
1841 return Convert<Tensor<1, dim, Number>>
::to_string(
1845 static T
to_value(
const std::string &s,
1846 const std::unique_ptr<Patterns::PatternBase> &pattern =
1854 template <
class Number>
1855 struct Convert<
std::complex<Number>>
1857 typedef std::complex<Number> T;
1859 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1861 static_assert(internal::RankInfo<T>::list_rank > 0,
1862 "Cannot use this class for non List-compatible types.");
1863 return std_cxx14::make_unique<Patterns::List>(
1867 internal::default_list_separator[internal::RankInfo<T>::list_rank - 1]);
1870 static std::string
to_string(
const T &t,
1871 const std::unique_ptr<Patterns::PatternBase>
1877 "to a List compatbile type."));
1879 auto base_p = p->get_base_pattern().clone();
1882 p->get_separator() +
" " +
1892 static T
to_value(
const std::string &s,
1893 const std::unique_ptr<Patterns::PatternBase> &pattern =
1901 "to a List compatbile type."));
1903 auto base_p = p->get_base_pattern().clone();
1915 struct Convert<
std::string>
1917 typedef std::string T;
1919 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1921 return std_cxx14::make_unique<Patterns::Anything>();
1924 static std::string
to_string(
const T &t,
1925 const std::unique_ptr<Patterns::PatternBase>
1932 static T
to_value(
const std::string &s,
1933 const std::unique_ptr<Patterns::PatternBase> &pattern =
1942 template <
class Key,
class Value>
1943 struct Convert<
std::pair<Key,Value>>
1945 typedef std::pair<Key,Value> T;
1947 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1949 static_assert(internal::RankInfo<T>::map_rank > 0,
1950 "Cannot use this class for non Map-compatible types.");
1951 return std_cxx14::make_unique<Patterns::Map>(
1957 internal::default_list_separator[internal::RankInfo<T>::list_rank],
1958 internal::default_map_separator[internal::RankInfo<T>::map_rank - 1]);
1961 static std::string
to_string(
const T &t,
1962 const std::unique_ptr<Patterns::PatternBase>
1965 std::unordered_map<Key, Value> m;
1972 static T
to_value(
const std::string &s,
1973 const std::unique_ptr<Patterns::PatternBase> &pattern =
1976 std::unordered_map<Key, Value> m;
1983 template <
class... Args>
1984 struct Convert<
std::tuple<Args...>>
1986 typedef std::tuple<Args...> T;
1988 static std::unique_ptr<Patterns::PatternBase>
to_pattern()
1990 static_assert(internal::RankInfo<T>::map_rank > 0,
1991 "Cannot use this class for non tuple-compatible types.");
1992 return std_cxx14::make_unique<Patterns::Tuple>(
1993 internal::default_map_separator[internal::RankInfo<T>::map_rank-1],
1997 static std::string
to_string(
const T &t,
1998 const std::unique_ptr<Patterns::PatternBase>
2005 const auto string_array = Convert<T>::to_string_internal_2(t,*p);
2007 for (
unsigned int i=0; i< string_array.size(); ++i)
2008 str += (i ?
" " + p->get_separator() +
" " :
"") +string_array[i];
2013 static T
to_value(
const std::string &s,
2014 const std::unique_ptr<Patterns::PatternBase> &pattern =
2021 "to a tuple type."));
2025 return Convert<T>::to_value_internal_2(v,*p);
2029 template<std::size_t... I>
2031 std::array<std::string, std::tuple_size<T>::value>
2032 to_string_internal_1(
const T &t,
2034 std_cxx14::index_sequence<I...>)
2036 std::array<std::string, std::tuple_size<T>::value> a
2038 Convert<typename std::tuple_element<I,T>::type>
:: 2046 std::array<std::string, std::tuple_size<T>::value>
2047 to_string_internal_2(
const T &t,
2050 return Convert<T>::to_string_internal_1(t, pattern,
2051 std_cxx14::make_index_sequence<std::tuple_size<T>::value> {});
2054 template<std::size_t... I>
2056 T to_value_internal_1(
const std::vector<std::string> &s,
2058 std_cxx14::index_sequence<I...>)
2060 return std::make_tuple(Convert<
typename std::tuple_element<I,T>::type>::
2065 T to_value_internal_2(
const std::vector<std::string> &s,
2068 return Convert<T>::to_value_internal_1(s, pattern,
2069 std_cxx14::make_index_sequence<std::tuple_size<T>::value> {});
2074 template<
typename T>
2081 template<
typename T>
2090 DEAL_II_NAMESPACE_CLOSE
const std::string & get_separator() const
std::vector< std::string > split_string_list(const std::string &s, const std::string &delimiter=",")
std::size_t memory_consumption() const
const std::string & get_separator() const
virtual bool match(const std::string &test_string) const
virtual bool match(const std::string &test_string) const
#define DeclException2(Exception2, type1, type2, outsequence)
#define AssertDimension(dim1, dim2)
static std::unique_ptr< FileName > create(const std::string &description)
static const char * description_init
static const char * description_init
static std::unique_ptr< Tuple > create(const std::string &description)
virtual bool match(const std::string &test_string) const
virtual std::unique_ptr< PatternBase > clone() const
const PatternBase & get_value_pattern() const
const std::string separator
std::size_t memory_consumption() const
const std::string separator
static std::unique_ptr< List > create(const std::string &description)
std::unique_ptr< PatternBase > pattern
static const unsigned int max_int_value
virtual std::unique_ptr< PatternBase > clone() const =0
static const char * description_init
virtual bool match(const std::string &test_string) const
virtual std::string description(const OutputStyle style=Machine) const
virtual std::unique_ptr< PatternBase > clone() const
static const int max_int_value
#define AssertThrow(cond, exc)
const std::string & get_separator() const
const unsigned int max_elements
static ::ExceptionBase & ExcCommasNotAllowed(int arg1)
static const char * description_init
static std::unique_ptr< Anything > create(const std::string &description)
Tuple(const std::vector< std::unique_ptr< PatternBase > > &patterns, const std::string &separator=":")
static const int min_int_value
virtual std::unique_ptr< PatternBase > clone() const
static ::ExceptionBase & ExcInvalidRange(int arg1, int arg2)
virtual std::unique_ptr< PatternBase > clone() const
FileName(const FileType type=input)
static const char * description_init
static ::ExceptionBase & ExcMessage(std::string arg1)
static const char * description_init
static std::unique_ptr< DirectoryName > create(const std::string &description)
static const char * description_init
#define DeclException1(Exception1, type1, outsequence)
virtual std::string description(const OutputStyle style=Machine) const
virtual std::string description(const OutputStyle style=Machine) const
std::vector< std::unique_ptr< PatternBase > > patterns
const PatternBase & get_key_pattern() const
Double(const double lower_bound=min_double_value, const double upper_bound=max_double_value)
#define Assert(cond, exc)
List(const PatternBase &base_pattern, const unsigned int min_elements=0, const unsigned int max_elements=max_int_value, const std::string &separator=",")
MultipleSelection(const std::string &seq)
virtual std::size_t memory_consumption() const
static const char * description_init
static std::unique_ptr< Map > create(const std::string &description)
static ::ExceptionBase & ExcInvalidRange(int arg1, int arg2)
static const char * description_init
std::unique_ptr< PatternBase > key_pattern
const PatternBase & get_base_pattern() const
static std::unique_ptr< Double > create(const std::string &description)
virtual ~PatternBase()=default
virtual std::string description(const OutputStyle style=Machine) const
std::size_t memory_consumption() const
static const double min_double_value
virtual std::string description(const OutputStyle style=Machine) const
std::unique_ptr< PatternBase > pattern_factory(const std::string &description)
virtual bool match(const std::string &test_string) const
virtual std::unique_ptr< PatternBase > clone() const
static const char * description_init
const std::string & get_key_value_separator() const
virtual std::string description(const OutputStyle style=Machine) const
virtual bool match(const std::string &test_string) const =0
virtual std::string description(const OutputStyle style=Machine) const
virtual std::unique_ptr< PatternBase > clone() const
virtual bool match(const std::string &test_string) const
virtual bool match(const std::string &test_string) const
virtual std::unique_ptr< PatternBase > clone() const
static const char * description_init
std::size_t memory_consumption() const
static const double max_double_value
virtual std::string description(const OutputStyle style=Machine) const
const PatternBase & get_pattern(const unsigned int &i) const
virtual std::string description(const OutputStyle style=Machine) const =0
virtual bool match(const std::string &test_string) const
static std::unique_ptr< MultipleSelection > create(const std::string &description)
Integer(const int lower_bound=min_int_value, const int upper_bound=max_int_value)
static std::unique_ptr< Bool > create(const std::string &description)
static std::unique_ptr< Selection > create(const std::string &description)
virtual std::unique_ptr< PatternBase > clone() const
Selection(const std::string &seq)
virtual std::unique_ptr< PatternBase > clone() const
static ::ExceptionBase & ExcNotImplemented()
Map(const PatternBase &key_pattern, const PatternBase &value_pattern, const unsigned int min_elements=0, const unsigned int max_elements=max_int_value, const std::string &separator=",", const std::string &key_value_separator=":")
virtual bool match(const std::string &test_string) const
virtual std::unique_ptr< PatternBase > clone() const
const unsigned int min_elements
static ::ExceptionBase & ExcNoMatch(std::string arg1, Patterns::PatternBase &arg2)
static const unsigned int max_int_value
const std::string separator
virtual std::string description(const OutputStyle style=Machine) const
const std::string key_value_separator
const unsigned int max_elements
virtual std::string description(const OutputStyle style=Machine) const
virtual std::unique_ptr< PatternBase > clone() const
virtual bool match(const std::string &test_string) const
const unsigned int min_elements
static std::unique_ptr< Integer > create(const std::string &description)
virtual std::string description(const OutputStyle style=Machine) const
std::size_t memory_consumption() const