YGP::IAttribute Class Reference

Baseclass for attributes. More...

Inherited by YGP::Attribute< T >, YGP::AttributeList< T, L >, YGP::AttributeMap< T, L >, and YGP::MetaEnumAttribute.

List of all members.

Public Member Functions

virtual ~IAttribute ()
virtual IAttributeclone ()=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)


Detailed Description

Baseclass for attributes.

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).


Constructor & Destructor Documentation

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.


Member Function Documentation

virtual bool YGP::IAttribute::assign ( const char *  value,
unsigned int   
) const [inline, virtual]

Assigns the passed text to the attribute value.

Parameters:
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]

virtual IAttribute* YGP::IAttribute::clone (  )  [pure virtual]

virtual std::string YGP::IAttribute::getFormattedValue (  )  const [inline, virtual]

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]

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.


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

YGP Version 0.9.31 - Generated on Wed Nov 18 11:25:27 2009 by doxygen 1.5.8