itom  4.1.0
ito::StringMeta Class Reference

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

#include <paramMeta.h>

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

Public Types

enum  tType { String, Wildcard, RegExp }
 
- Public Types inherited from ito::ParamMeta
enum  MetaRtti {
  rttiUnknown = 0, rttiCharMeta = 1, rttiIntMeta = 2, rttiDoubleMeta = 3,
  rttiStringMeta = 4, rttiHWMeta = 5, rttiDObjMeta = 6, rttiIntArrayMeta = 7,
  rttiDoubleArrayMeta = 8, rttiCharArrayMeta = 9, rttiIntervalMeta = 10, rttiDoubleIntervalMeta = 11,
  rttiRangeMeta = 12, rttiRectMeta = 13
}
 Runtime type information. More...
 
enum  tRepresentation {
  Linear = 0x0001, Logarithmic = 0x0002, Boolean = 0x0004, PureNumber = 0x0008,
  HexNumber = 0x0010, IPV4Address = 0x0020, MACAddress = 0x0040, UnknownRepresentation = 0x0080
}
 The representation of number types indicates the type of widget that is suited best to display and change the value. More...
 

Public Member Functions

 StringMeta (tType type, ito::ByteArray category=ito::ByteArray())
 constructor More...
 
 StringMeta (tType type, const char *val, ito::ByteArray category=ito::ByteArray())
 constructor More...
 
 StringMeta (tType type, const ito::ByteArray &val, ito::ByteArray category=ito::ByteArray())
 constructor More...
 
 StringMeta (const StringMeta &cpy)
 copy constructor
 
virtual ~StringMeta ()
 destructor
 
tType getStringType () const
 returns the type how strings in list should be considered. More...
 
void setStringType (tType type)
 sets the type how strings in pattern list should be considered. More...
 
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.
 
bool addItem (const ito::ByteArray &val)
 adds another element to the list of patterns.
 
void clearItems ()
 clear all elements from the pattern list.
 
StringMetaoperator+= (const char *val)
 add another pattern string to the list of patterns.
 
StringMetaoperator= (const StringMeta &rhs)
 
virtual bool operator== (const ParamMeta &other) const
 
- Public Member Functions inherited from ito::ParamMeta
 ParamMeta (ito::ByteArray category=ito::ByteArray())
 default constructor with an unknown meta information type
 
 ParamMeta (MetaRtti type, ito::ByteArray category=ito::ByteArray())
 constructor used by derived classes to indicate their real type
 
virtual ~ParamMeta ()
 destructor
 
MetaRtti getType () const
 returns runtime type information value
 
ito::ByteArray getCategory () const
 returns category name of this parameter (default: empty ByteArray)
 
void setCategory (const ito::ByteArray &category)
 
bool operator!= (const ParamMeta &other) const
 

Private Attributes

StringMetaPrivatep
 

Additional Inherited Members

- Protected Attributes inherited from ito::ParamMeta
MetaRtti m_type
 
ito::ByteArray m_category
 optional category name of this parameter
 

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,
ito::ByteArray  category = ito::ByteArray() 
)

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,
ito::ByteArray  category = ito::ByteArray() 
)

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
ito::StringMeta::StringMeta ( tType  type,
const ito::ByteArray val,
ito::ByteArray  category = ito::ByteArray() 
)

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

StringMeta::tType ito::StringMeta::getStringType ( ) const

returns the type how strings in list should be considered.

See also
tType
void ito::StringMeta::setStringType ( tType  type)

sets the type how strings in pattern list should be considered.

See also
tType

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