YGP::MetaEnumAttribute Class Reference

An attribute to assign an integer-value from a list of string-values. More...

Inherits YGP::IAttribute.

List of all members.

Public Member Functions

 MetaEnumAttribute (const char *name, const MetaEnum &list, unsigned int &attr)
 MetaEnumAttribute (const std::string &name, const MetaEnum &list, unsigned int &attr)
 ~MetaEnumAttribute ()
virtual IAttributeclone ()
virtual bool assignFromString (const char *value) const
virtual bool assign (const char *value, unsigned int) const
unsigned int & getAttribute () const
virtual std::string getValue () const
virtual std::string getFormattedValue () const


Detailed Description

An attribute to assign an integer-value from a list of string-values.

Constructor & Destructor Documentation

YGP::MetaEnumAttribute::MetaEnumAttribute ( const char *  name,
const MetaEnum list,
unsigned int &  attr 
) [inline]

Constructor; creates an attribute with the specified name, referencing the attribute value.

YGP::MetaEnumAttribute::MetaEnumAttribute ( const std::string &  name,
const MetaEnum list,
unsigned int &  attr 
) [inline]

Constructor; creates an attribute with the specified name, referencing the attribute value.

YGP::MetaEnumAttribute::~MetaEnumAttribute (  )  [inline]

Destructor.


Member Function Documentation

virtual bool YGP::MetaEnumAttribute::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 from YGP::IAttribute.

bool YGP::MetaEnumAttribute::assignFromString ( const char *  value  )  const [virtual]

Assigs a string-value to the attribute; This value must be defined in the MetaEnum.

Parameters:
value Value to assign
Returns:
bool True, if value was assigned successfully

Implements YGP::IAttribute.

virtual IAttribute* YGP::MetaEnumAttribute::clone (  )  [inline, virtual]

Returns a copy of the attribute.

Implements YGP::IAttribute.

unsigned int& YGP::MetaEnumAttribute::getAttribute (  )  const [inline]

Returns a reference to the handled attribute value.

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

Returns the value of the attribute (value) as formatted string.

Reimplemented from YGP::IAttribute.

virtual std::string YGP::MetaEnumAttribute::getValue (  )  const [inline, virtual]

Returns the value of the attribute (value).

Implements YGP::IAttribute.


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

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