![]() |
Reference documentation for deal.II version 8.1.0
|
#include <parameter_handler.h>
Public Member Functions | |
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=",") | |
virtual | ~Map () |
virtual bool | match (const std::string &test_string) const |
virtual std::string | description () const |
virtual PatternBase * | clone () const |
std::size_t | memory_consumption () const |
DeclException2 (ExcInvalidRange, int, int,<< "The values "<< arg1<< " and "<< arg2<< " do not form a valid range.") | |
![]() | |
virtual | ~PatternBase () |
Static Public Member Functions | |
static Map * | create (const std::string &description) |
Static Public Attributes | |
static const unsigned int | max_int_value |
Private Attributes | |
PatternBase * | key_pattern |
PatternBase * | value_pattern |
const unsigned int | min_elements |
const unsigned int | max_elements |
const std::string | separator |
Static Private Attributes | |
static const char * | description_init |
This pattern matches a list of comma-separated values each of which denotes a pair of key and value. Both key and value have to match a pattern given to the constructor. For each entry of the map, parameters have to be entered in the form key: value
. In other words, a map is described in the form key1: value1, key2: value2, key3: value3, ...
. A constructor argument allows to choose a delimiter between pairs other than the comma.
With two additional parameters, the number of elements this list has to have can be specified. If none is specified, the map may have zero or more entries.
Definition at line 491 of file parameter_handler.h.
Patterns::Map::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 = "," |
||
) |
Constructor. Take the given parameter as the specification of valid elements of the list.
The three other arguments can be used to denote minimal and maximal allowable lengths of the list as well as the separator used to delimit pairs of the map.
|
virtual |
Destructor.
|
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 |
Return a description of the pattern that valid strings are expected to match.
Implements Patterns::PatternBase.
|
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 |
Creates new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
|
virtual |
Determine an estimate for the memory consumption (in bytes) of this object.
Reimplemented from Patterns::PatternBase.
|
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 499 of file parameter_handler.h.
|
private |
Copy of the patterns that each key and each value of the map has to satisfy.
Definition at line 568 of file parameter_handler.h.
|
private |
Minimum number of elements the list must have.
Definition at line 574 of file parameter_handler.h.
|
private |
Maximum number of elements the list must have.
Definition at line 579 of file parameter_handler.h.
|
private |
Separator between elements of the list.
Definition at line 584 of file parameter_handler.h.
|
staticprivate |
Initial part of description
Definition at line 589 of file parameter_handler.h.