Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes

Patterns::List Class Reference

Inheritance diagram for Patterns::List:
Inheritance graph
[legend]

List of all members.

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 PatternBaseclone () const
std::size_t memory_consumption () const

Static Public Member Functions

static Listcreate (const std::string &description)
::ExceptionBaseExcInvalidRange (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

PatternBasepattern
const unsigned int min_elements
const unsigned int max_elements

Static Private Attributes

static const char * description_init

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

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.

Copy of the pattern that each element of the list has to satisfy.

Definition at line 644 of file parameter_handler.h.

Minimum number of elements the list must have.

Definition at line 650 of file parameter_handler.h.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:15 by doxygen 1.7.2