| |
libFAUDES
Sections
Index
|
faudes::AttributeTimedState Class Reference |
Public Member Functions | |
virtual AttributeTimedState * | New (void) const |
Construct on heap. | |
virtual AttributeTimedState * | Copy (void) const |
Construct on heap. | |
virtual const AttributeTimedState * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual AttributeTimedState & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual bool | Equal (const Type &rOther) const |
Test equality of configuration data. | |
virtual AttributeTimedState & | operator= (const AttributeTimedState &rSrc) |
virtual bool | operator== (const AttributeTimedState &rOther) const |
virtual bool | operator!= (const AttributeTimedState &rOther) const |
AttributeTimedState (void) | |
Constructor. | |
virtual bool | IsDefault (void) const |
Test for default value (ie empty invariant and default flags). | |
Public Attributes | |
TimeConstraint | mInvariant |
Invariant. | |
Protected Member Functions | |
AttributeTimedState & | DoAssign (const AttributeTimedState &rSrcAttr) |
Assignment method. | |
bool | DoEqual (const AttributeTimedState &rOther) const |
Test eaulity. | |
virtual void | DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
Reads the attribute from TokenReader, see AttributeVoid for public wrappers. | |
virtual void | DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
Writes the attribute to TokenWriter, see AttributeVoid for public wrappers. |
faudes::AttributeTimedState::AttributeTimedState | ( | void | ) | [inline] |
AttributeTimedState * faudes::AttributeTimedState::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 113 of file tp_attributes.cpp.
AttributeTimedState * faudes::AttributeTimedState::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 113 of file tp_attributes.cpp.
const AttributeTimedState * faudes::AttributeTimedState::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 113 of file tp_attributes.cpp.
AttributeTimedState & faudes::AttributeTimedState::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 113 of file tp_attributes.cpp.
bool faudes::AttributeTimedState::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 113 of file tp_attributes.cpp.
AttributeTimedState & faudes::AttributeTimedState::operator= | ( | const AttributeTimedState & | rSrc | ) | [virtual] |
Definition at line 113 of file tp_attributes.cpp.
bool faudes::AttributeTimedState::operator== | ( | const AttributeTimedState & | rOther | ) | const [virtual] |
Definition at line 113 of file tp_attributes.cpp.
bool faudes::AttributeTimedState::operator!= | ( | const AttributeTimedState & | rOther | ) | const [virtual] |
Definition at line 113 of file tp_attributes.cpp.
virtual bool faudes::AttributeTimedState::IsDefault | ( | void | ) | const [inline, virtual] |
Test for default value (ie empty invariant and default flags).
Reimplemented from faudes::AttributeFlags.
Definition at line 136 of file tp_attributes.h.
AttributeTimedState & faudes::AttributeTimedState::DoAssign | ( | const AttributeTimedState & | rSrcAttr | ) | [protected] |
Assignment method.
rSrcAttr | Source to assign from |
Definition at line 116 of file tp_attributes.cpp.
bool faudes::AttributeTimedState::DoEqual | ( | const AttributeTimedState & | rOther | ) | const [protected] |
Test eaulity.
rOther | Other attribute to compare with. |
Definition at line 125 of file tp_attributes.cpp.
void faudes::AttributeTimedState::DoRead | ( | TokenReader & | rTr, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | [protected, virtual] |
Reads the attribute from TokenReader, see AttributeVoid for public wrappers.
If the current token indicates a invariant section, the method reads the invariant from that section. Else, it does nothing. Exceptions may only be thrown on invalid data within the timing section. The context argument is ignored, the label argument can be used to override the default section name Invariant.
rTr | TokenReader to read from | |
rLabel | Section to read | |
pContext | Read context to provide contextual information |
Exception |
|
Reimplemented from faudes::AttributeFlags.
Definition at line 149 of file tp_attributes.cpp.
void faudes::AttributeTimedState::DoWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | const [protected, virtual] |
Writes the attribute to TokenWriter, see AttributeVoid for public wrappers.
Writes am Invariant section to include data on the invariant. The label argument can be used to set a section label different the the default Invariant. Th context argument is ignored.
rTw | TokenWriter to write to | |
rLabel | Section to write | |
pContext | Write context to provide contextual information |
Exception |
|
Reimplemented from faudes::AttributeFlags.
Definition at line 136 of file tp_attributes.cpp.
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6