Inherited by YGP::Attribute< T >, YGP::AttributeList< T, L >, YGP::AttributeMap< T, L >, and YGP::MetaEnumAttribute.
Public Member Functions | |
virtual | ~IAttribute () |
virtual IAttribute * | clone ()=0 |
bool | matches (const char *pName) const |
bool | matches (const std::string &name_) const |
virtual bool | assignFromString (const char *value) const =0 |
virtual bool | assign (const char *value, unsigned int) const |
const std::string & | getName () const |
virtual std::string | getValue () const =0 |
virtual std::string | getFormattedValue () const |
virtual std::string | getQuotedValue () const |
Protected Member Functions | |
IAttribute (const char *pName) | |
IAttribute (const std::string &name_) | |
IAttribute (const IAttribute &other) |
Derive from it for every type of attribute.
An attribute is defined to be the connection between a name and an attribute-value (which is not stored inside the attribute but only refereneced).
virtual YGP::IAttribute::~IAttribute | ( | ) | [inline, virtual] |
Destructor.
YGP::IAttribute::IAttribute | ( | const char * | pName | ) | [inline, protected] |
Constructor; creates an attribute with the specified name.
YGP::IAttribute::IAttribute | ( | const std::string & | name_ | ) | [inline, protected] |
Constructor; creates an attribute with the specified name.
YGP::IAttribute::IAttribute | ( | const IAttribute & | other | ) | [inline, protected] |
Copyconstructor; clones the attribute.
virtual bool YGP::IAttribute::assign | ( | const char * | value, | |
unsigned int | ||||
) | const [inline, virtual] |
Assigns the passed text to the attribute value.
value | Value to assign | |
Length | of passed value |
Reimplemented in YGP::Attribute< T >, YGP::AttributeList< T, L >, YGP::MetaEnumAttribute, YGP::AttributeMap< T, L >, YGP::Attribute< T >, and YGP::Attribute< T >.
virtual bool YGP::IAttribute::assignFromString | ( | const char * | value | ) | const [pure virtual] |
Assigns the passed text to the attribute value.
true
on success; false
otherwise Implemented in YGP::Attribute< T >, YGP::AttributeList< T, L >, YGP::MetaEnumAttribute, YGP::AttributeMap< T, L >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, and YGP::Attribute< T >.
virtual IAttribute* YGP::IAttribute::clone | ( | ) | [pure virtual] |
Returns a copy of the attribute.
Implemented in YGP::Attribute< T >, YGP::AttributeList< T, L >, YGP::MetaEnumAttribute, and YGP::AttributeMap< T, L >.
virtual std::string YGP::IAttribute::getFormattedValue | ( | ) | const [inline, virtual] |
Returns the value of the attribute (value) as formatted string.
Reimplemented in YGP::Attribute< T >, YGP::MetaEnumAttribute, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, and YGP::Attribute< T >.
const std::string& YGP::IAttribute::getName | ( | ) | const [inline] |
Returns the name of the attribute.
virtual std::string YGP::IAttribute::getQuotedValue | ( | ) | const [inline, virtual] |
Returns the value of the attribute (value) as quoted string, if necessary.
Reimplemented in YGP::Attribute< T >, YGP::Attribute< T >, and YGP::Attribute< T >.
virtual std::string YGP::IAttribute::getValue | ( | ) | const [pure virtual] |
Returns the value of the attribute (value).
Implemented in YGP::Attribute< T >, YGP::AttributeList< T, L >, YGP::MetaEnumAttribute, YGP::AttributeMap< T, L >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, YGP::Attribute< T >, and YGP::Attribute< T >.
bool YGP::IAttribute::matches | ( | const std::string & | name_ | ) | const [inline] |
Checks if the passed text matches the name of the attribute.
bool YGP::IAttribute::matches | ( | const char * | pName | ) | const [inline] |
Checks if the passed text matches the name of the attribute.