
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 |
| std::size_t | memory_consumption () const |
Static Public Member Functions | |
| static List * | create (const std::string &description) |
| ::ExceptionBase & | ExcInvalidRange (int arg1, int arg2) throw (errortext << "The values " << arg1 << " and " << arg2 << " do not form a valid range." ) |
Static Public Attributes | |
| static const unsigned int | max_int_value |
Private Attributes | |
| PatternBase * | pattern |
| const unsigned int | min_elements |
| const unsigned int | max_elements |
Static Private Attributes | |
| static const char * | description_init |
This pattern matches a list of comma-separated values each of which have to match a pattern given to the constructor. With two additional parameters, the number of elements this list has to have can be specified. If none is specified, the list may have zero or more entries.
Definition at line 548 of file parameter_handler.h.
| 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.
| static List* Patterns::List::create | ( | const std::string & | description ) | [static] |
Creates new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
| std::size_t Patterns::List::memory_consumption | ( | ) | const [virtual] |
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.
Definition at line 561 of file parameter_handler.h.
PatternBase* Patterns::List::pattern [private] |
Copy of the pattern that each element of the list has to satisfy.
Definition at line 644 of file parameter_handler.h.
const unsigned int Patterns::List::min_elements [private] |
Minimum number of elements the list must have.
Definition at line 650 of file parameter_handler.h.
const unsigned int Patterns::List::max_elements [private] |
Minimum number of elements the list must have.
Definition at line 656 of file parameter_handler.h.
const char* Patterns::List::description_init [static, private] |
Initial part of description
Definition at line 661 of file parameter_handler.h.
documentation generated on Fri Feb 3 2012 06:04:15 by
doxygen
1.7.2