itom 2.0.0
ito::StringMeta Class Reference

Meta-information for Param of type String. More...

#include <paramMeta.h>

Inheritance diagram for ito::StringMeta:
ito::ParamMeta

List of all members.

Public Types

enum  tType { String, Wildcard, RegExp }

Public Member Functions

 StringMeta (tType type)
 constructor
 StringMeta (tType type, const char *val)
 constructor
 StringMeta (const StringMeta &cpy)
 copy constructor
virtual ~StringMeta ()
 destructor
tType getStringType () const
 returns the type how strings in list should be considered.
int getLen () const
 returns the number of string elements in meta information class.
const char * getString (int idx=0) const
 returns string from list at index position or NULL, if index is out of range.
bool addItem (const char *val)
 adds another element to the list of patterns.
StringMetaoperator+= (const char *val)
 add another pattern string to the list of patterns.

Private Attributes

tType m_stringType
int m_len
char ** m_val

Detailed Description

Meta-information for Param of type String.

An object of this class can be used to parametrize a parameter whose type is ito::ParamBase::String. If set, it is possible to restrict the a given string to fit to a given list of strings. This list of strings might be interpreted in an exact way (tType::String), as wildcard expressions (tType::Wildcard) or as regular expressions (tType::RegExp).

See also:
ito::Param, ito::ParamMeta

Member Enumeration Documentation

Enumerator:
String 

string elements should be considered as strings (exact match)

Wildcard 

string elements should be considered as wildcard-expressions (e.g. *.doc)

RegExp 

string elements should be considered as regular expressions (e.g. ^(.*)[abc]{1,5}$)


Constructor & Destructor Documentation

ito::StringMeta::StringMeta ( tType  type)

constructor

Returns a meta information class for string-types.

Parameters:
typeindicates how the string elements should be considered
See also:
tType
ito::StringMeta::StringMeta ( tType  type,
const char *  val 
)

constructor

Returns a meta information class for string-types.

Parameters:
typeindicates how the string elements should be considered
valadds a first string to the element list
See also:
tType

Member Function Documentation

tType ito::StringMeta::getStringType ( ) const [inline]

returns the type how strings in list should be considered.

See also:
tType

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