
Classes | |
| class | ExcInvalidRange |
Public Member Functions | |
| List (const PatternBase &base_pattern, const unsigned int min_elements=0, const unsigned int max_elements=max_int_value) | |
| virtual | ~List () |
| virtual bool | match (const std::string &test_string) const |
| virtual std::string | description () const |
| virtual PatternBase * | clone () const |
| unsigned int | memory_consumption () const |
Static Public Attributes | |
| static const unsigned int | max_int_value |
Private Attributes | |
| PatternBase * | pattern |
| const unsigned int | min_elements |
| const unsigned int | max_elements |
| Patterns::List::List | ( | const PatternBase & | base_pattern, | |
| const unsigned int | min_elements = 0, |
|||
| const unsigned int | max_elements = max_int_value | |||
| ) |
Constructor. Take the given parameter as the specification of valid elements of the list.
The two other arguments can be used to denote minimal and maximal allowable lengths of the list.
| virtual Patterns::List::~List | ( | ) | [virtual] |
Destructor.
| virtual bool Patterns::List::match | ( | const std::string & | test_string | ) | const [virtual] |
Return true if the string is a comma-separated list of strings each of which match the pattern given to the constructor.
Implements Patterns::PatternBase.
| virtual std::string Patterns::List::description | ( | ) | const [virtual] |
Return a description of the pattern that valid strings are expected to match.
Implements Patterns::PatternBase.
| virtual PatternBase* Patterns::List::clone | ( | ) | const [virtual] |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Implements Patterns::PatternBase.
Determine an estimate for the memory consumption (in bytes) of this object.
Reimplemented from Patterns::PatternBase.
const unsigned int Patterns::List::max_int_value [static] |
Maximal integer value. If the numeric_limits class is available use this information to obtain the extremal values, otherwise set it so that this class understands that all values are allowed.
PatternBase* Patterns::List::pattern [private] |
Copy of the pattern that each element of the list has to satisfy.
const unsigned int Patterns::List::min_elements [private] |
Minimum number of elements the list must have.
const unsigned int Patterns::List::max_elements [private] |
Minimum number of elements the list must have.
documentation generated on Sat Aug 15 16:52:42 2009 by
doxygen
1.5.9