Inherits YGP::IAttribute.
Public Member Functions | |
AttributeList (const char *name, L &list) | |
AttributeList (const std::string &name, L &list) | |
~AttributeList () | |
virtual IAttribute * | clone () |
virtual bool | assignFromString (const char *value) const |
virtual bool | assignFromString (unsigned int offset, const char *value) const |
virtual bool | assign (unsigned int offset, const char *value, unsigned int length) const |
virtual bool | assign (const char *value, unsigned int length) const |
std::string | getValue () const |
bool | isValidOffset (unsigned int offset) const |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | assign (unsigned int offset, const char *value, unsigned int length) const |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | doAssignFromString (unsigned int offset, const char *value) const throw(std::out_of_range) |
template<> | |
bool | assign (unsigned int 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::AttributeList< T, L >::AttributeList | ( | const char * | name, | |
L & | list | |||
) | [inline] |
Constructor; creates an attribute list with the specified name, referencing the (vector of) attribute values.
YGP::AttributeList< T, L >::AttributeList | ( | const std::string & | name, | |
L & | list | |||
) | [inline] |
Constructor; creates an attribute list with the specified name, referencing the (vector of) attribute values.
YGP::AttributeList< T, L >::~AttributeList | ( | ) | [inline] |
Destructor.
bool YGP::AttributeList< std::string >::assign | ( | unsigned int | offset, | |
const char * | value, | |||
unsigned int | length | |||
) | const [inline] |
true
on success; false
otherwise virtual bool YGP::AttributeList< T, L >::assign | ( | const char * | value, | |
unsigned int | length | |||
) | const [inline, virtual] |
Method to assign a value from a character-pointer to the attribute list.
See assignFromString() for details.
Reimplemented from YGP::IAttribute.
virtual bool YGP::AttributeList< T, L >::assign | ( | unsigned int | 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 list.
See See assignFromString() for details.
virtual bool YGP::AttributeList< T, L >::assignFromString | ( | unsigned int | offset, | |
const char * | value | |||
) | const [inline, virtual] |
Method to assign a value from a character-pointer to a single (specified) element of the list.
offset
is not checked vor validity! virtual bool YGP::AttributeList< T, L >::assignFromString | ( | const char * | value | ) | const [inline, virtual] |
Method to assign a value from a character-pointer to the attribute list.
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::AttributeList< T, L >::clone | ( | ) | [inline, virtual] |
bool YGP::AttributeList< std::string >::doAssignFromString | ( | unsigned int | offset, | |
const char * | value | |||
) | const throw(std::out_of_range) [inline] |
true
on success; false
otherwise std::string YGP::AttributeList< T, L >::getValue | ( | ) | const [inline, virtual] |
Returns the value of the attribute list.
This is a string of [offset]=[value];
entries.
Implements YGP::IAttribute.
bool YGP::AttributeList< T, L >::isValidOffset | ( | unsigned int | offset | ) | const [inline] |
Checks if the passed value specifies a valid offset.
true
, if the offset is valid