| |
libFAUDES
Sections
Index
|
faudes::AttributeColoredState Class Reference |
Public Member Functions | |
virtual AttributeColoredState * | New (void) const |
Construct on heap. | |
virtual AttributeColoredState * | Copy (void) const |
Construct on heap. | |
virtual const AttributeColoredState * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual AttributeColoredState & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual bool | Equal (const Type &rOther) const |
Test equality of configuration data. | |
virtual AttributeColoredState & | operator= (const AttributeColoredState &rSrc) |
virtual bool | operator== (const AttributeColoredState &rOther) const |
virtual bool | operator!= (const AttributeColoredState &rOther) const |
AttributeColoredState (void) | |
Default constructor. | |
virtual | ~AttributeColoredState (void) |
bool | IsDefault (void) const |
Test for default value. | |
NameSet::Iterator | ColorsBegin () const |
Iterator for first entry in mColors. | |
NameSet::Iterator | ColorsEnd () const |
Iterator for last entry in mColors. | |
const ColorSet & | Colors (void) const |
Read access to color set. | |
ColorSet & | Colors (void) |
Writable access to color set. | |
void | Colors (const ColorSet &rColors) |
Set the color set. | |
void | ColorSymTab (SymbolTable *pSymTab) |
Set pointer to color symbol table. | |
SymbolTable * | ColorSymTabp (void) const |
Get pointer to color symbol table. | |
Protected Member Functions | |
virtual AttributeColoredState & | DoAssign (const AttributeColoredState &rSrcAttr) |
Assignment method. | |
virtual bool | DoEqual (const AttributeColoredState &rOther) const |
Test equality of configuration data. | |
virtual void | DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
Write attributes to tokenwriter. | |
virtual void | DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
Read attributes from tokenreader. | |
Protected Attributes | |
ColorSet | mColors |
Colorset. | |
SymbolTable * | mpColorSymbolTable |
Pointer to colorsymboltable. |
faudes::AttributeColoredState::AttributeColoredState | ( | void | ) | [inline] |
virtual faudes::AttributeColoredState::~AttributeColoredState | ( | void | ) | [inline, virtual] |
Definition at line 52 of file mtc_attributes.h.
AttributeColoredState * faudes::AttributeColoredState::New | ( | void | ) | const [virtual] |
Construct on heap.
Technically not a constructor, this function creates an object with the same type Type. New() is defined as a virtual function and derived classes are meant to re-implement with the appropiate constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.
Reimplemented from faudes::AttributeFlags.
Definition at line 33 of file mtc_attributes.cpp.
AttributeColoredState * faudes::AttributeColoredState::Copy | ( | void | ) | const [virtual] |
Construct on heap.
Technically not a constructor, this function creates an object with the same type Type and the same configuration. Copy() is defined as a virtual function and derived classes are meant to re-implement with the appropiate copy constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.
Reimplemented from faudes::AttributeFlags.
Definition at line 33 of file mtc_attributes.cpp.
const AttributeColoredState * faudes::AttributeColoredState::Cast | ( | const Type * | pOther | ) | const [virtual] |
Cast other object to this type.
Enables the run-time interface to test whether pObject is derived from this object. This feature is used e.g. in the faudes container classes to test attributes. Derived classes must reimplement this function using the appropriate dynamic cast.
Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
Reimplemented from faudes::AttributeFlags.
Definition at line 33 of file mtc_attributes.cpp.
AttributeColoredState & faudes::AttributeColoredState::Assign | ( | const Type & | rSrc | ) | [virtual] |
Assign configuration data from other object.
Derived classes should reimplement this method to first try to cast the source to the respective class. If successful, the protected function DoAssign is invoked to perform the actual assignment. If the cast fails, the Assign method of the parent class is called. Thus, faudes objects are up- and downcatsted for assignment, maintaining as much of the source data as digestable by the destination object. On the downside, there is no sensible typechecking at compile-time.
Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
rSrc | Source to copy from |
Reimplemented from faudes::AttributeFlags.
Definition at line 33 of file mtc_attributes.cpp.
bool faudes::AttributeColoredState::Equal | ( | const Type & | rOther | ) | const [virtual] |
Test equality of configuration data.
Derived classes should reimplement this method to return true if both actual types and configuration data match. The object name is not consired in the test.
This method calls the virtual method DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
rOther | Other objevt to compare with. |
Reimplemented from faudes::AttributeFlags.
Definition at line 33 of file mtc_attributes.cpp.
AttributeColoredState & faudes::AttributeColoredState::operator= | ( | const AttributeColoredState & | rSrc | ) | [virtual] |
Definition at line 33 of file mtc_attributes.cpp.
bool faudes::AttributeColoredState::operator== | ( | const AttributeColoredState & | rOther | ) | const [virtual] |
Definition at line 33 of file mtc_attributes.cpp.
bool faudes::AttributeColoredState::operator!= | ( | const AttributeColoredState & | rOther | ) | const [virtual] |
Definition at line 33 of file mtc_attributes.cpp.
bool faudes::AttributeColoredState::IsDefault | ( | void | ) | const [inline, virtual] |
Test for default value.
Reimplemented from faudes::AttributeFlags.
Definition at line 60 of file mtc_attributes.h.
NameSet::Iterator faudes::AttributeColoredState::ColorsBegin | ( | ) | const |
NameSet::Iterator faudes::AttributeColoredState::ColorsEnd | ( | ) | const |
const ColorSet& faudes::AttributeColoredState::Colors | ( | void | ) | const [inline] |
Read access to color set.
Definition at line 78 of file mtc_attributes.h.
ColorSet& faudes::AttributeColoredState::Colors | ( | void | ) | [inline] |
Writable access to color set.
Definition at line 87 of file mtc_attributes.h.
void faudes::AttributeColoredState::Colors | ( | const ColorSet & | rColors | ) | [inline] |
Set the color set.
rColors | New color set |
Definition at line 95 of file mtc_attributes.h.
void faudes::AttributeColoredState::ColorSymTab | ( | SymbolTable * | pSymTab | ) |
Set pointer to color symbol table.
pSymTab | New color symbol table |
Definition at line 84 of file mtc_attributes.cpp.
SymbolTable * faudes::AttributeColoredState::ColorSymTabp | ( | void | ) | const |
Get pointer to color symbol table.
Definition at line 89 of file mtc_attributes.cpp.
AttributeColoredState & faudes::AttributeColoredState::DoAssign | ( | const AttributeColoredState & | rSrcAttr | ) | [protected, virtual] |
Assignment method.
rSrcAttr | Source to assign from |
Definition at line 36 of file mtc_attributes.cpp.
bool faudes::AttributeColoredState::DoEqual | ( | const AttributeColoredState & | rOther | ) | const [protected, virtual] |
Test equality of configuration data.
rOther | Other attribute to compare with. |
Definition at line 45 of file mtc_attributes.cpp.
void faudes::AttributeColoredState::DoWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | const [protected, virtual] |
Write attributes to tokenwriter.
rTw | Tokenreader to write to | |
rLabel | Section to write | |
pContext | Write context to provide contextual information |
Exception | I/O errors |
Reimplemented from faudes::AttributeFlags.
Definition at line 57 of file mtc_attributes.cpp.
void faudes::AttributeColoredState::DoRead | ( | TokenReader & | rTr, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | [protected, virtual] |
Read attributes from tokenreader.
rTr | Tokenreader to read from | |
rLabel | Section to read | |
pContext | Read context to provide contextual information |
Exception | Thrown on file format errors (ids 50, 51) |
Reimplemented from faudes::AttributeFlags.
Definition at line 63 of file mtc_attributes.cpp.
ColorSet faudes::AttributeColoredState::mColors [protected] |
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6