Inherits YGP::IAttribute.
Public Member Functions | |
AttributeMap (const char *name, L &map) | |
AttributeMap (const std::string &name, L &map) | |
~AttributeMap () | |
virtual IAttribute * | clone () |
virtual bool | assignFromString (const char *value) const |
virtual bool | assign (const char *value, unsigned int length) const |
virtual bool | assignFromString (const std::string &offset, const char *value) const |
virtual bool | assign (const std::string &offset, const char *value, unsigned int length) const |
std::string | getValue () const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assign (const std::string &offset, const char *value, unsigned int length) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assignFromString (const std::string &offset, const char *value) const |
template<> | |
bool | assign (const std::string &offset, const char *value, unsigned int length) const |
This class is designed to be used by AttributeValues (and derived types), but there exists specializations for:
YGP::AttributeMap< T, L >::AttributeMap | ( | const char * | name, | |
L & | map | |||
) | [inline] |
Constructor; creates an attribute map with the specified name, referencing the (vector of) attribute values.
YGP::AttributeMap< T, L >::AttributeMap | ( | const std::string & | name, | |
L & | map | |||
) | [inline] |
Constructor; creates an attribute map with the specified name, referencing the (vector of) attribute values.
YGP::AttributeMap< T, L >::~AttributeMap | ( | ) | [inline] |
Destructor.
bool YGP::AttributeMap< std::string >::assign | ( | const std::string & | offset, | |
const char * | value, | |||
unsigned int | length | |||
) | const [inline] |
true
on success; false
otherwise virtual bool YGP::AttributeMap< T, L >::assign | ( | const std::string & | offset, | |
const char * | value, | |||
unsigned int | length | |||
) | const [inline, virtual] |
Method to assign a value from a character-pointer to a single (specified) element of the map.
See See assignFromString() for details.
virtual bool YGP::AttributeMap< T, L >::assign | ( | const char * | value, | |
unsigned int | length | |||
) | const [inline, virtual] |
Method to assign a value from a character-pointer to the attribute map.
See assignFromString() for details.
Reimplemented from YGP::IAttribute.
bool YGP::AttributeMap< std::string >::assignFromString | ( | const std::string & | offset, | |
const char * | value | |||
) | const [inline] |
true
on success; false
otherwise virtual bool YGP::AttributeMap< T, L >::assignFromString | ( | const std::string & | offset, | |
const char * | value | |||
) | const [inline, virtual] |
Method to assign a value from a character-pointer to a single (specified) element of the map.
offset
is not checked vor validity! virtual bool YGP::AttributeMap< T, L >::assignFromString | ( | const char * | value | ) | const [inline, virtual] |
Method to assign a value from a character-pointer to the attribute map.
The character-array is supposed to be a sequence of offset=value entries, which are separated by a semicolon (;). In case of an error (invalid offset or value) the assigning is stopped; leaving the previously (valid) entries assigned.
true
on success; false
otherwise Implements YGP::IAttribute.
virtual IAttribute* YGP::AttributeMap< T, L >::clone | ( | ) | [inline, virtual] |
std::string YGP::AttributeMap< T, L >::getValue | ( | ) | const [inline, virtual] |
Returns the value of the attribute map.
This is a string of [offset]=[value];
entries.
Implements YGP::IAttribute.