Reference documentation for deal.II version 9.2.0
|
#include <deal.II/base/patterns.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=",", const std::string &key_value_separator=":") | |
Map (const Map &other) | |
virtual bool | match (const std::string &test_string) const override |
virtual std::string | description (const OutputStyle style=Machine) const override |
virtual std::unique_ptr< PatternBase > | clone () const override |
std::size_t | memory_consumption () const override |
const PatternBase & | get_key_pattern () const |
const PatternBase & | get_value_pattern () const |
const std::string & | get_separator () const |
const std::string & | get_key_value_separator () const |
Public Member Functions inherited from Patterns::PatternBase | |
virtual | ~PatternBase ()=default |
Static Public Member Functions | |
static std::unique_ptr< Map > | create (const std::string &description) |
static ::ExceptionBase & | ExcInvalidRange (int arg1, int arg2) |
Static Public Attributes | |
static const unsigned int | max_int_value |
Private Attributes | |
std::unique_ptr< PatternBase > | key_pattern |
std::unique_ptr< PatternBase > | value_pattern |
const unsigned int | min_elements |
const unsigned int | max_elements |
const std::string | separator |
const std::string | key_value_separator |
Static Private Attributes | |
static const char * | description_init = "[Map" |
Additional Inherited Members | |
Public Types inherited from Patterns::PatternBase | |
enum | OutputStyle { Machine, Text, LaTeX } |
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, ...
. Two constructor arguments allow to choose a delimiter between pairs other than the comma, and a delimiter between key and value other than colon.
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 585 of file patterns.h.