| |
libFAUDES
Sections
Index
|
faudes::ColorSet Class Reference |
Public Member Functions | |
virtual ColorSet * | New (void) const |
Construct on heap. | |
virtual ColorSet * | Copy (void) const |
Construct on heap. | |
virtual const ColorSet * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual ColorSet & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual bool | Equal (const Type &rOther) const |
Test equality of configuration data. | |
virtual ColorSet & | operator= (const ColorSet &rSrc) |
virtual bool | operator== (const ColorSet &rOther) const |
virtual bool | operator!= (const ColorSet &rOther) const |
ColorSet (void) | |
Constructor for ColorSet with static ColorSymbolTable. | |
ColorSet (SymbolTable *pSymTab) | |
Constructor for ColorSet with specified symbol table. | |
ColorSet (const std::string &rFilename, const std::string &rLabel="Colors") | |
Constructor for ColorSet with static ColorSymbolTable. | |
virtual | ~ColorSet (void) |
void | ColorSymbolTablep (SymbolTable *pSymTab) |
Reset pointer mpSymbolTable. | |
ColorSet | operator* (const ColorSet &rOtherSet) const |
Set intersection operator. | |
ColorSet | operator+ (const ColorSet &rOtherSet) const |
Set union operator. | |
ColorSet | operator- (const ColorSet &rOtherSet) const |
Set difference operator. | |
bool | operator<= (const ColorSet &rOtherSet) const |
Test for subset. | |
bool | operator>= (const ColorSet &rOtherSet) const |
Test for superset. | |
Static Public Member Functions | |
static SymbolTable * | StaticSymbolTablep (void) |
Get pointer to static ColorSymbolTable. | |
Protected Member Functions | |
virtual ColorSet & | DoAssign (const ColorSet &rSourceSet) |
Assign from other color set. | |
Static Protected Attributes | |
static SymbolTable | msSymbolTable |
Static global symbol table for color names. |
faudes::ColorSet::ColorSet | ( | void | ) | [inline] |
Constructor for ColorSet with static ColorSymbolTable.
Definition at line 50 of file mtc_colorset.h.
faudes::ColorSet::ColorSet | ( | SymbolTable * | pSymTab | ) | [inline] |
faudes::ColorSet::ColorSet | ( | const std::string & | rFilename, | |
const std::string & | rLabel = "Colors" | |||
) | [inline] |
Constructor for ColorSet with static ColorSymbolTable.
This version reads a file with given label to find the colors inside the file.
rFilename | Filename | |
rLabel | Token label for the colors in the file; default value "Colors" |
Definition at line 73 of file mtc_colorset.h.
virtual faudes::ColorSet::~ColorSet | ( | void | ) | [inline, virtual] |
Definition at line 77 of file mtc_colorset.h.
ColorSet * faudes::ColorSet::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::NameSet.
Definition at line 53 of file mtc_colorset.cpp.
ColorSet * faudes::ColorSet::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::NameSet.
Definition at line 35 of file mtc_colorset.cpp.
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::NameSet.
Definition at line 36 of file mtc_colorset.cpp.
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::NameSet.
Definition at line 37 of file mtc_colorset.cpp.
bool faudes::ColorSet::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::NameSet.
Definition at line 38 of file mtc_colorset.cpp.
Definition at line 37 of file mtc_colorset.cpp.
bool faudes::ColorSet::operator== | ( | const ColorSet & | rOther | ) | const [virtual] |
Definition at line 38 of file mtc_colorset.cpp.
bool faudes::ColorSet::operator!= | ( | const ColorSet & | rOther | ) | const [virtual] |
Definition at line 38 of file mtc_colorset.cpp.
SymbolTable * faudes::ColorSet::StaticSymbolTablep | ( | void | ) | [static] |
Get pointer to static ColorSymbolTable.
Definition at line 61 of file mtc_colorset.cpp.
void faudes::ColorSet::ColorSymbolTablep | ( | SymbolTable * | pSymTab | ) |
Reset pointer mpSymbolTable.
pSymTab | Pointer to new symbol table |
Definition at line 66 of file mtc_colorset.cpp.
Set intersection operator.
Definition at line 71 of file mtc_colorset.cpp.
Set difference operator.
Definition at line 87 of file mtc_colorset.cpp.
bool faudes::ColorSet::operator<= | ( | const ColorSet & | rOtherSet | ) | const |
bool faudes::ColorSet::operator>= | ( | const ColorSet & | rOtherSet | ) | const |
Assign from other color set.
rSourceSet | Destination to copy from |
Definition at line 45 of file mtc_colorset.cpp.
SymbolTable faudes::ColorSet::msSymbolTable [static, protected] |
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6