libFAUDES

Sections

Index

faudes::ColorSet Class Reference
[Multitasking PlugIn]

#include <mtc_colorset.h>

Inherits faudes::NameSet.

List of all members.


Detailed Description

Container for colors: this is a NameSet with its own static symboltable.

Definition at line 41 of file mtc_colorset.h.


Public Member Functions

virtual ColorSetNew (void) const
 Construct on heap.
virtual ColorSetCopy (void) const
 Construct on heap.
virtual const ColorSetCast (const Type *pOther) const
 Cast other object to this type.
virtual ColorSetAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data.
virtual ColorSetoperator= (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 SymbolTableStaticSymbolTablep (void)
 Get pointer to static ColorSymbolTable.

Protected Member Functions

virtual ColorSetDoAssign (const ColorSet &rSourceSet)
 Assign from other color set.

Static Protected Attributes

static SymbolTable msSymbolTable
 Static global symbol table for color names.

Constructor & Destructor Documentation

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]

Constructor for ColorSet with specified symbol table.

Definition at line 58 of file mtc_colorset.h.

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.

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


Member Function Documentation

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.

Returns:
Pointer to new Type object

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.

Returns:
Pointer to new Type object

Reimplemented from faudes::NameSet.

Definition at line 35 of file mtc_colorset.cpp.

const ColorSet * faudes::ColorSet::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.

Returns:
Typed pointer object

Reimplemented from faudes::NameSet.

Definition at line 36 of file mtc_colorset.cpp.

ColorSet & faudes::ColorSet::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.

Parameters:
rSrc Source to copy from
Returns:
Reference to this object.

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.

Parameters:
rOther Other objevt to compare with.
Returns:
True on match.

Reimplemented from faudes::NameSet.

Definition at line 38 of file mtc_colorset.cpp.

ColorSet & faudes::ColorSet::operator= ( const ColorSet rSrc  )  [virtual]

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.

Returns:
Pointer to static ColorSymbolTable

Definition at line 61 of file mtc_colorset.cpp.

void faudes::ColorSet::ColorSymbolTablep ( SymbolTable pSymTab  ) 

Reset pointer mpSymbolTable.

Parameters:
pSymTab Pointer to new symbol table

Definition at line 66 of file mtc_colorset.cpp.

ColorSet faudes::ColorSet::operator* ( const ColorSet rOtherSet  )  const

Set intersection operator.

Returns:
Intersection ColorSet

Definition at line 71 of file mtc_colorset.cpp.

ColorSet faudes::ColorSet::operator+ ( const ColorSet rOtherSet  )  const

Set union operator.

Returns:
Union Set

Definition at line 79 of file mtc_colorset.cpp.

ColorSet faudes::ColorSet::operator- ( const ColorSet rOtherSet  )  const

Set difference operator.

Returns:
Difference ColorSet

Definition at line 87 of file mtc_colorset.cpp.

bool faudes::ColorSet::operator<= ( const ColorSet rOtherSet  )  const

Test for subset.

Definition at line 95 of file mtc_colorset.cpp.

bool faudes::ColorSet::operator>= ( const ColorSet rOtherSet  )  const

Test for superset.

Definition at line 100 of file mtc_colorset.cpp.

ColorSet & faudes::ColorSet::DoAssign ( const ColorSet rSourceSet  )  [protected, virtual]

Assign from other color set.

Parameters:
rSourceSet Destination to copy from
Returns:
ref to this set

Definition at line 45 of file mtc_colorset.cpp.


Member Data Documentation

Static global symbol table for color names.

Definition at line 130 of file mtc_colorset.h.


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

libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6