19 const std::pair<limit_type, limit_type> m_limits;
20 const bool m_multiple;
23 constexpr
VM() : m_limits(std::make_pair(1,1)), m_multiple(false) {}
24 explicit constexpr
VM(limit_type n) : m_limits(std::make_pair(n,n)), m_multiple(false) {}
25 explicit VM(
const std::string& vm);
26 constexpr
VM(limit_type min, limit_type max,
bool multiple =
false)
27 : m_limits(std::make_pair(min, max)),
31 const std::pair<limit_type, limit_type>&
limits()
const;
38 friend std::ostream&
operator<<(std::ostream& os,
const VM& vm);
41 static const std::regex REGEX;
42 static std::pair<limit_type,limit_type> get_pair(
const std::string& vm);
const std::pair< limit_type, limit_type > & limits() const
uint32_t limit_type
Definition: vm.h:12
friend std::ostream & operator<<(std::ostream &os, const VM &vm)
constexpr VM(limit_type n)
Definition: vm.h:24
static const unsigned MAX_LIMIT
Definition: vm.h:10
bool allows_multiplicity(limit_type multiplicity) const
constexpr VM(limit_type min, limit_type max, bool multiple=false)
Definition: vm.h:26
constexpr VM()
Definition: vm.h:23