libFAUDES

Sections

Index

faudes::ClockSet Class Reference
[Timed Automata PlugIn]

#include <tp_timeconstraint.h>

Inherits faudes::NameSet.

List of all members.


Detailed Description

Container class to model a set of clocks.

Technically, this is a NameSet with a static SymbolTable to map symbolic clock names to clock indices. Thus, clock names are global similar to event names. Note that clocksets of individual TtGenerators are assumed to be disjoint.

Todo: explicitely inherit other constructors (!)

Definition at line 38 of file tp_timeconstraint.h.


Public Member Functions

virtual ClockSetNew (void) const
 Construct on heap.
virtual ClockSetCopy (void) const
 Construct on heap.
virtual const ClockSetCast (const Type *pOther) const
 Cast other object to this type.
virtual ClockSetAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data.
virtual ClockSetoperator= (const ClockSet &rSrc)
virtual bool operator== (const ClockSet &rOther) const
virtual bool operator!= (const ClockSet &rOther) const
 ClockSet (void)
 Constructor.
 ClockSet (const ClockSet &rOtherSet)
 Copy-constructor.
 ClockSet (const std::string &rFilename, const std::string &rLabel="Clocks")
 Construct from file.

Static Public Member Functions

static SymbolTableStaticSymbolTablep (void)
 Get pointer to static clock SymbolTable.

Protected Member Functions

virtual ClockSetDoAssign (const ClockSet &rSourceSet)
 Assign from other clock set.
virtual bool DoEqual (const ClockSet &rOtherSet) const
 Test equality with other clock set.

Static Protected Attributes

static SymbolTable msSymbolTable
 Static global SymbolTable for clock names.

Constructor & Destructor Documentation

faudes::ClockSet::ClockSet ( void   ) 

Constructor.

Definition at line 36 of file tp_timeconstraint.cpp.

faudes::ClockSet::ClockSet ( const ClockSet rOtherSet  ) 

Copy-constructor.

Parameters:
rOtherSet Set to copy

Definition at line 44 of file tp_timeconstraint.cpp.

faudes::ClockSet::ClockSet ( const std::string &  rFilename,
const std::string &  rLabel = "Clocks" 
)

Construct from file.

Uses the NameSet's Read() function to scan a file for a specified clockset.

Parameters:
rFilename File to read
rLabel Section label for the clocks in the file; default value "Clocks"

Definition at line 49 of file tp_timeconstraint.cpp.


Member Function Documentation

ClockSet * faudes::ClockSet::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 57 of file tp_timeconstraint.cpp.

ClockSet * faudes::ClockSet::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 27 of file tp_timeconstraint.cpp.

const ClockSet * faudes::ClockSet::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 28 of file tp_timeconstraint.cpp.

ClockSet & faudes::ClockSet::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 29 of file tp_timeconstraint.cpp.

bool faudes::ClockSet::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 30 of file tp_timeconstraint.cpp.

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

Definition at line 29 of file tp_timeconstraint.cpp.

bool faudes::ClockSet::operator== ( const ClockSet rOther  )  const [virtual]

Definition at line 30 of file tp_timeconstraint.cpp.

bool faudes::ClockSet::operator!= ( const ClockSet rOther  )  const [virtual]

Definition at line 30 of file tp_timeconstraint.cpp.

SymbolTable * faudes::ClockSet::StaticSymbolTablep ( void   )  [static]

Get pointer to static clock SymbolTable.

Returns:
Pointer to static clock SymbolTable

Definition at line 78 of file tp_timeconstraint.cpp.

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

Assign from other clock set.

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

Definition at line 64 of file tp_timeconstraint.cpp.

bool faudes::ClockSet::DoEqual ( const ClockSet rOtherSet  )  const [protected, virtual]

Test equality with other clock set.

Parameters:
rOtherSet Set to compare with
Returns:
True/false

Definition at line 72 of file tp_timeconstraint.cpp.


Member Data Documentation

Static global SymbolTable for clock names.

Definition at line 80 of file tp_timeconstraint.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