Patterns::List Class Reference

Inheritance diagram for Patterns::List:

Inheritance graph
[legend]

List of all members.

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 PatternBaseclone () const
unsigned int memory_consumption () const

Static Public Attributes

static const unsigned int max_int_value

Private Attributes

PatternBasepattern
const unsigned int min_elements
const unsigned int max_elements


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.

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.

unsigned int 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.

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

Minimum number of elements the list must have.

Minimum number of elements the list must have.


The documentation for this class was generated from the following file:

deal.II documentation generated on Sat Aug 15 16:52:42 2009 by doxygen 1.5.9