libFAUDES

Sections

Index

faudes::Type Class Reference
[Run-Time Interface]

#include <rtitypes.h>

Inherited by faudes::AttributeVoid, faudes::Boolean, faudes::Documentation, faudes::EventRelabelMap, faudes::Function, faudes::FunctionRegistry, faudes::Integer, faudes::ParallelExecutor, faudes::ParallelExecutor::ParallelTimedState, faudes::Signature, faudes::String, faudes::SymbolTable, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::TypeRegistry, faudes::vDevice, faudes::vGenerator, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, and faudes::TBaseSet< std::string >.

List of all members.


Detailed Description

Base class of all libFAUDES objects that participate in the run time interface.

Eg, generator, alphabet, attributes etc. The class is designed to impose as little overhead as possible, and hence, does not hold any data. It does, however, provide a uniform interface for token IO, assignment, and the run-time interface.

Token IO converts to objects configuration data to and from token streams. It can be facilitated for file IO but also for conversions to/from std::string. When deriving from Type, you should reimplement virtual protected

  • DoRead to read the defining data from a token stream
  • DoWrite to write the defining data to a token stream

To support the faudes run-time interface, the class Type also declares the virtual functions for type-cast and assignment

  • New to construct an object of identical type on heap,
  • Clear to reset all configuration data,
  • Cast to dynamically cast another object to this type,
  • Assign to do an assignment from any castable Type derivate
  • Equal to test equality with any castable Type derivate
  • DoAssign, or the operator "=", to assign from an object with identical type.
  • DoEqual, or the operators "==" and "!=", to test equality of configuration data

While New, Cast, Assign, Equal and the operators "=", "==", "!=" can be derived via the convenience macros FAUDES_TYPE_DELARATION and FAUDES_TYPE_IMPLEMENTATION, Clear, DoAssign and DoEqual must be adapted to the actual member data.

Definition at line 205 of file rtitypes.h.


Public Member Functions

 Type (void)
 Constructor.
 Type (const Type &rType)
 Copy constructor.
virtual ~Type (void)
 Destructor.
virtual TypeNew (void) const
 Construct on heap.
virtual TypeCopy (void) const
 Construct on heap.
virtual const TypeCast (const Type *pOther) const
 Cast other object to this type.
virtual void Clear (void)
 Clear configuration data.
virtual TypeAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object.
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data.
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data.
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data.
virtual void Name (const std::string &rName)
 Set the objects's name.
virtual const std::string & Name (void) const
 Get objects's name.
void Write (const Type *pContext=0) const
 Write configuration data to console.
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file.
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file.
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter.
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string.
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string.
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format.
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file, debugging format.
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter.
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter.
void SWrite (void) const
 Write statistics comment to console.
std::string ToSText (void) const
 Write statistics to a string.
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified.
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Write configuration data to a string.
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified.

Protected Member Functions

virtual TypeDoAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual bool DoEqual (const Type &rOther) const
 Test equality of configuration data.
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data of this object from TokenReader.
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data of this object to TokenWriter.
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debugging format to TokenWriter.
virtual void DoSWrite (TokenWriter &rTw) const
 Write statistical data as a comment to TokenWriter.

Static Protected Attributes

static const std::string mName
 static default name

Constructor & Destructor Documentation

faudes::Type::Type ( void   ) 

Constructor.

Definition at line 43 of file rtitypes.cpp.

faudes::Type::Type ( const Type rType  ) 

Copy constructor.

Definition at line 46 of file rtitypes.cpp.

faudes::Type::~Type ( void   )  [virtual]

Destructor.

Definition at line 49 of file rtitypes.cpp.


Member Function Documentation

Type * faudes::Type::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 in faudes::TaBaseSet< T, Attr, Cmp >, faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::AttributeCFlags, faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::IndexSet, faudes::TaIndexSet< Attr >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::Function, faudes::Integer, faudes::String, faudes::Boolean, faudes::TSimpleFunction1< FTYPE0, CFNCT >, faudes::TSimpleFunction2< FTYPE0, FTYPE1, CFNCT >, faudes::TSimpleFunction3< FTYPE0, FTYPE1, FTYPE2, CFNCT >, faudes::TNestedFunction< FTYPE, CFNCT >, faudes::SymbolSet, faudes::TTransSet< Cmp >, faudes::TaTransSet< Attr >, faudes::vGenerator, faudes::EventRelabelMap, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::HioEventFlags, faudes::HioStateFlags, faudes::THioConstraint< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioController< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioEnvironment< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioPlant< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::AttributeColoredState, faudes::ColorSet, faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::AttributeTimedTrans, faudes::AttributeTimedState, faudes::AttributeTimedGlobal, faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::ClockSet, faudes::SimConditionAttribute, faudes::SimConditionSet, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSignalEvent, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeSimplenetEvent, faudes::AttributeDeviceEvent, faudes::TaBaseSet< long unsigned int, faudes::SimEventAttribute >, faudes::TaBaseSet< long unsigned int, faudes::AttributeCFlags >, faudes::TaBaseSet< long unsigned int, EventAttr >, faudes::TaBaseSet< long unsigned int, faudes::HioStateFlags >, faudes::TaBaseSet< long unsigned int, StateAttr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeTimedState >, faudes::TaBaseSet< long unsigned int, faudes::AttributeFailureEvents >, faudes::TaBaseSet< long unsigned int, faudes::DiagLabelSet >, faudes::TaBaseSet< long unsigned int, faudes::HioEventFlags >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSimplenetEvent >, faudes::TaBaseSet< long unsigned int, Attr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSignalEvent >, faudes::TaBaseSet< faudes::Transition, Attr, faudes::TransSort::X1EvX2 >, faudes::TaBaseSet< long unsigned int, faudes::SimConditionAttribute >, faudes::TaGenerator< faudes::AttributeTimedGlobal, faudes::AttributeTimedState, faudes::AttributeCFlags, faudes::AttributeTimedTrans >, faudes::TaGenerator< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TcGenerator< faudes::AttributeTimedGlobal, faudes::AttributeTimedState, faudes::AttributeCFlags, faudes::AttributeTimedTrans >, faudes::TaIndexSet< faudes::AttributeTimedState >, faudes::TaIndexSet< faudes::HioStateFlags >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< faudes::DiagLabelSet >, faudes::TaNameSet< faudes::HioEventFlags >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< faudes::SimConditionAttribute >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::SimEventAttribute >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< faudes::AttributeCFlags >, faudes::TTransSet< faudes::TransSort::EvX2X1 >, faudes::TTransSet< faudes::TransSort::X1EvX2 >, faudes::THioConstraint< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::THioController< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::THioEnvironment< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::THioPlant< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, and faudes::TtGenerator< faudes::AttributeTimedGlobal, faudes::AttributeTimedState, faudes::AttributeCFlags, faudes::AttributeTimedTrans >.

Definition at line 52 of file rtitypes.cpp.

Type * faudes::Type::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 in faudes::TaBaseSet< T, Attr, Cmp >, faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::AttributeCFlags, faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::IndexSet, faudes::TaIndexSet< Attr >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::Integer, faudes::String, faudes::Boolean, faudes::SymbolSet, faudes::TTransSet< Cmp >, faudes::TaTransSet< Attr >, faudes::vGenerator, faudes::EventRelabelMap, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::HioEventFlags, faudes::HioStateFlags, faudes::THioConstraint< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioController< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioEnvironment< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::THioPlant< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::AttributeColoredState, faudes::ColorSet, faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::AttributeTimedTrans, faudes::AttributeTimedState, faudes::AttributeTimedGlobal, faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::ClockSet, faudes::SimConditionAttribute, faudes::SimConditionSet, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSignalEvent, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeSimplenetEvent, faudes::AttributeDeviceEvent, faudes::TaBaseSet< long unsigned int, faudes::SimEventAttribute >, faudes::TaBaseSet< long unsigned int, faudes::AttributeCFlags >, faudes::TaBaseSet< long unsigned int, EventAttr >, faudes::TaBaseSet< long unsigned int, faudes::HioStateFlags >, faudes::TaBaseSet< long unsigned int, StateAttr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeTimedState >, faudes::TaBaseSet< long unsigned int, faudes::AttributeFailureEvents >, faudes::TaBaseSet< long unsigned int, faudes::DiagLabelSet >, faudes::TaBaseSet< long unsigned int, faudes::HioEventFlags >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSimplenetEvent >, faudes::TaBaseSet< long unsigned int, Attr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSignalEvent >, faudes::TaBaseSet< faudes::Transition, Attr, faudes::TransSort::X1EvX2 >, faudes::TaBaseSet< long unsigned int, faudes::SimConditionAttribute >, faudes::TaGenerator< faudes::AttributeTimedGlobal, faudes::AttributeTimedState, faudes::AttributeCFlags, faudes::AttributeTimedTrans >, faudes::TaGenerator< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TcGenerator< faudes::AttributeTimedGlobal, faudes::AttributeTimedState, faudes::AttributeCFlags, faudes::AttributeTimedTrans >, faudes::TaIndexSet< faudes::AttributeTimedState >, faudes::TaIndexSet< faudes::HioStateFlags >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< faudes::DiagLabelSet >, faudes::TaNameSet< faudes::HioEventFlags >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< faudes::SimConditionAttribute >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::SimEventAttribute >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< faudes::AttributeCFlags >, faudes::TTransSet< faudes::TransSort::EvX2X1 >, faudes::TTransSet< faudes::TransSort::X1EvX2 >, faudes::THioConstraint< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::THioController< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::THioEnvironment< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::THioPlant< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, and faudes::TtGenerator< faudes::AttributeTimedGlobal, faudes::AttributeTimedState, faudes::AttributeCFlags, faudes::AttributeTimedTrans >.

Definition at line 57 of file rtitypes.cpp.

const Type * faudes::Type::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 in faudes::TaBaseSet< T, Attr, Cmp >, faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::AttributeCFlags, faudes::IndexSet, faudes::TaIndexSet< Attr >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::SymbolSet, faudes::TTransSet< Cmp >, faudes::TaTransSet< Attr >, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::HioEventFlags, faudes::HioStateFlags, faudes::AttributeColoredState, faudes::ColorSet, faudes::AttributeTimedTrans, faudes::AttributeTimedState, faudes::AttributeTimedGlobal, faudes::ClockSet, faudes::SimConditionAttribute, faudes::SimConditionSet, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSignalEvent, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeSimplenetEvent, faudes::AttributeDeviceEvent, faudes::TaBaseSet< long unsigned int, faudes::SimEventAttribute >, faudes::TaBaseSet< long unsigned int, faudes::AttributeCFlags >, faudes::TaBaseSet< long unsigned int, EventAttr >, faudes::TaBaseSet< long unsigned int, faudes::HioStateFlags >, faudes::TaBaseSet< long unsigned int, StateAttr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeTimedState >, faudes::TaBaseSet< long unsigned int, faudes::AttributeFailureEvents >, faudes::TaBaseSet< long unsigned int, faudes::DiagLabelSet >, faudes::TaBaseSet< long unsigned int, faudes::HioEventFlags >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSimplenetEvent >, faudes::TaBaseSet< long unsigned int, Attr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSignalEvent >, faudes::TaBaseSet< faudes::Transition, Attr, faudes::TransSort::X1EvX2 >, faudes::TaBaseSet< long unsigned int, faudes::SimConditionAttribute >, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TaIndexSet< faudes::AttributeTimedState >, faudes::TaIndexSet< faudes::HioStateFlags >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< faudes::DiagLabelSet >, faudes::TaNameSet< faudes::HioEventFlags >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< faudes::SimConditionAttribute >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::SimEventAttribute >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< faudes::AttributeCFlags >, faudes::TTransSet< faudes::TransSort::EvX2X1 >, and faudes::TTransSet< faudes::TransSort::X1EvX2 >.

Definition at line 62 of file rtitypes.cpp.

void faudes::Type::Clear ( void   )  [virtual]

Clear configuration data.

Derived classes should re-implement this method to ensure some consistent configuration data.

Reimplemented in faudes::TaBaseSet< T, Attr, Cmp >, faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::AttributeVoid, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::TaIndexSet< Attr >, faudes::Signature, faudes::FunctionDefinition, faudes::TypeRegistry, faudes::FunctionRegistry, faudes::Documentation, faudes::TypeDefinition, faudes::SymbolTable, faudes::TaTransSet< Attr >, faudes::vGenerator, faudes::EventRelabelMap, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::DeviceExecutor, faudes::Executor, faudes::LoggingExecutor, faudes::ParallelExecutor, faudes::ProposingExecutor, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSignalEvent, faudes::sDevice, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeSimplenetEvent, faudes::nDevice, faudes::AttributeDeviceEvent, faudes::vDevice, faudes::xDevice, faudes::TaBaseSet< long unsigned int, faudes::SimEventAttribute >, faudes::TaBaseSet< long unsigned int, faudes::AttributeCFlags >, faudes::TaBaseSet< long unsigned int, EventAttr >, faudes::TaBaseSet< long unsigned int, faudes::HioStateFlags >, faudes::TaBaseSet< long unsigned int, StateAttr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeTimedState >, faudes::TaBaseSet< long unsigned int, faudes::AttributeFailureEvents >, faudes::TaBaseSet< long unsigned int, faudes::DiagLabelSet >, faudes::TaBaseSet< long unsigned int, faudes::HioEventFlags >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSimplenetEvent >, faudes::TaBaseSet< long unsigned int, Attr >, faudes::TaBaseSet< long unsigned int, faudes::AttributeSignalEvent >, faudes::TaBaseSet< faudes::Transition, Attr, faudes::TransSort::X1EvX2 >, faudes::TaBaseSet< long unsigned int, faudes::SimConditionAttribute >, faudes::TaGenerator< faudes::AttributeTimedGlobal, faudes::AttributeTimedState, faudes::AttributeCFlags, faudes::AttributeTimedTrans >, faudes::TaGenerator< faudes::AttributeVoid, faudes::HioStateFlags, faudes::HioEventFlags, faudes::AttributeVoid >, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TaIndexSet< faudes::AttributeTimedState >, faudes::TaIndexSet< faudes::HioStateFlags >, faudes::TaIndexSet< StateAttr >, and faudes::TaIndexSet< faudes::DiagLabelSet >.

Definition at line 67 of file rtitypes.cpp.

Type & faudes::Type::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 in faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::AttributeCFlags, faudes::IndexSet, faudes::TaIndexSet< Attr >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::SymbolSet, faudes::TTransSet< Cmp >, faudes::TaTransSet< Attr >, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::HioEventFlags, faudes::HioStateFlags, faudes::AttributeColoredState, faudes::ColorSet, faudes::AttributeTimedTrans, faudes::AttributeTimedState, faudes::AttributeTimedGlobal, faudes::ClockSet, faudes::SimConditionAttribute, faudes::SimConditionSet, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSignalEvent, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeSimplenetEvent, faudes::AttributeDeviceEvent, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TaIndexSet< faudes::AttributeTimedState >, faudes::TaIndexSet< faudes::HioStateFlags >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< faudes::DiagLabelSet >, faudes::TaNameSet< faudes::HioEventFlags >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< faudes::SimConditionAttribute >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::SimEventAttribute >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< faudes::AttributeCFlags >, faudes::TTransSet< faudes::TransSort::EvX2X1 >, and faudes::TTransSet< faudes::TransSort::X1EvX2 >.

Definition at line 72 of file rtitypes.cpp.

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

Assign configurationdata from other object.

Derived classes should implement the operator form for the assignment for each source type which allows for a non-trivial assignment. This includes the particular case were the source and destination types match exactly. In the latter case the DoAssign method should be invoked. In contrast to the Assign function, the operator form must not be reimplemented for missmatched source types: the operator form only accepts sensible source types. This allows for compiletime typeckecking. However, the downside is that when the type is not known at compiletime, configuration is not properly assigned.

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.

Definition at line 94 of file rtitypes.cpp.

bool faudes::Type::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 in faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::AttributeCFlags, faudes::IndexSet, faudes::TaIndexSet< Attr >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::SymbolSet, faudes::TTransSet< Cmp >, faudes::TaTransSet< Attr >, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::HioEventFlags, faudes::HioStateFlags, faudes::AttributeColoredState, faudes::ColorSet, faudes::AttributeTimedTrans, faudes::AttributeTimedState, faudes::AttributeTimedGlobal, faudes::ClockSet, faudes::SimConditionAttribute, faudes::SimConditionSet, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSignalEvent, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeSimplenetEvent, faudes::AttributeDeviceEvent, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TaIndexSet< faudes::AttributeTimedState >, faudes::TaIndexSet< faudes::HioStateFlags >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< faudes::DiagLabelSet >, faudes::TaNameSet< faudes::HioEventFlags >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< faudes::SimConditionAttribute >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::SimEventAttribute >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< faudes::AttributeCFlags >, faudes::TTransSet< faudes::TransSort::EvX2X1 >, and faudes::TTransSet< faudes::TransSort::X1EvX2 >.

Definition at line 79 of file rtitypes.cpp.

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

Test equality of configuration data.

The operator form of the equality test is only defined for matching types, no cast will be performed. Thus, the test will be optimistic if the type is not known at compiletime. The object name is not consired in the test.

This methoc 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.

Definition at line 84 of file rtitypes.cpp.

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

Test equality of configuration data.

See operator==(const Type&).

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 mismatch.

Definition at line 89 of file rtitypes.cpp.

void faudes::Type::Write ( const Type pContext = 0  )  const

Write configuration data to console.

Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
pContext Write context to provide contextual information

Definition at line 122 of file rtitypes.cpp.

void faudes::Type::Write ( const std::string &  pFileName,
const std::string &  rLabel = "",
const Type pContext = 0,
std::ios::openmode  openmode = std::ios::out|std::ios::trunc 
) const

Write configuration data to a file.

Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
pFileName Name of file
rLabel Label of section to write
pContext Write context to provide contextual information
openmode ios::openmode
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 128 of file rtitypes.cpp.

void faudes::Type::Write ( const std::string &  pFileName,
std::ios::openmode  openmode 
) const

Write configuration data to a file.

Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
pFileName Name of file
openmode ios::openmode
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 142 of file rtitypes.cpp.

void faudes::Type::Write ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const

Write configuration data to TokenWriter.

Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 147 of file rtitypes.cpp.

std::string faudes::Type::ToString ( const std::string &  rLabel = "",
const Type pContext = 0 
) const

Write configuration data to a string.

Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
rLabel Label of section to write
pContext Write context to provide contextual information
Returns:
output string
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 152 of file rtitypes.cpp.

std::string faudes::Type::ToText ( const std::string &  rLabel = "",
const Type pContext = 0 
) const

Write configuration data to a formated string.

In contrast to ToString, ToText does not suppress comments and End-Of-Line marks. Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
rLabel Label of section to write
pContext Write context to provide contextual information
Returns:
output string
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 168 of file rtitypes.cpp.

void faudes::Type::DWrite ( const Type pContext = 0  )  const

Write configuration data to console, debugging format.

Note: this write function uses the virtual function DoDWrite(), to be reimplemented by derived classes.

Parameters:
pContext Write context to provide contextual information

Definition at line 176 of file rtitypes.cpp.

void faudes::Type::DWrite ( const std::string &  pFileName,
const std::string &  rLabel = "",
const Type pContext = 0,
std::ios::openmode  openmode = std::ios::out|std::ios::trunc 
) const

Write configuration data to a file, debugging format.

Note: this write function uses the virtual function DoDWrite(), to be reimplemented by derived classes.

Parameters:
pFileName Name of file
rLabel Label of section to write
pContext Write context to provide contextual information
openmode ios::openmode
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 182 of file rtitypes.cpp.

void faudes::Type::DWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const

Write configuration data in debug format to TokenWriter.

Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 196 of file rtitypes.cpp.

void faudes::Type::SWrite ( TokenWriter rTw  )  const

Write statistics comment to TokenWriter.

Note: this write function use the virtual function DoSWrite(), to be reimplemented by derived classes.

Parameters:
rTw Reference to TokenWriter
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 207 of file rtitypes.cpp.

void faudes::Type::SWrite ( void   )  const

Write statistics comment to console.

Note: this write function uses the virtual function DoSWrite(), to be reimplemented by derived classes.

Definition at line 201 of file rtitypes.cpp.

std::string faudes::Type::ToSText ( void   )  const

Write statistics to a string.

Note: this write function uses the virtual function DoSWrite(), to be reimplemented by derived classes.

Returns:
output string
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 160 of file rtitypes.cpp.

void faudes::Type::Read ( const std::string &  rFileName,
const std::string &  rLabel = "",
const Type pContext = 0 
)

Read configuration data from file with label specified.

Note: all read functions use the virtual function DoRead(), to be reimplemented for by derived classes.

Parameters:
rFileName Name of file
rLabel Section to read from
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 1)
  • token mismatch from DoRead()

Definition at line 212 of file rtitypes.cpp.

void faudes::Type::FromString ( const std::string &  rString,
const std::string &  rLabel = "",
const Type pContext = 0 
)

Write configuration data to a string.

Note: this write function uses the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
rString String to read from
rLabel Section to read
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 1)
  • token mismatch from DoRead()

Definition at line 225 of file rtitypes.cpp.

void faudes::Type::Read ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
)

Read configuration data from TokenReader with label sepcified.

Note: all read functions use the virtual function DoRead(), to be reimplemented for by derived classes.

Parameters:
rTr Reference to tokenreader
rLabel Section to read
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 1)
  • token mismatch from DoRead()

Definition at line 219 of file rtitypes.cpp.

Type & faudes::Type::DoAssign ( const Type rSrc  )  [protected, virtual]

Assign configuration data from other object.

Reimplement this function to copy all configuration data from another faudes object. Typically, you will first call the base class' DoAssign, which includes a Clear(). Then, you will set up any additional members.

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

Definition at line 101 of file rtitypes.cpp.

bool faudes::Type::DoEqual ( const Type rOther  )  const [protected, virtual]

Test equality of configuration data.

Derived classes should reimplement this method to compare all relevant configuration, except the name.

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

Definition at line 107 of file rtitypes.cpp.

void faudes::Type::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
) [protected, virtual]

Read configuration data of this object from TokenReader.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters:
rTr TokenReader to read from
rLabel Section to read
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO error (id 1)

Reimplemented in faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::AttributeCFlags, faudes::IndexSet, faudes::NameSet, faudes::Signature, faudes::FunctionDefinition, faudes::Documentation, faudes::TypeDefinition, faudes::Integer, faudes::String, faudes::Boolean, faudes::SymbolSet, faudes::SymbolTable, faudes::vGenerator, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::HioEventFlags, faudes::HioStateFlags, faudes::AttributeColoredState, faudes::AttributeTimedTrans, faudes::AttributeTimedState, faudes::AttributeTimedGlobal, faudes::LoggingExecutor, faudes::ParallelExecutor::ParallelTimedState, faudes::ParallelExecutor, faudes::ProposingExecutor, faudes::SimConditionAttribute, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeDeviceEvent, faudes::vDevice, faudes::xDevice, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, and faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >.

Definition at line 252 of file rtitypes.cpp.

void faudes::Type::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const [protected, virtual]

Write configuration data of this object to TokenWriter.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Reimplemented in faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::AttributeCFlags, faudes::IndexSet, faudes::NameSet, faudes::Signature, faudes::FunctionDefinition, faudes::Function, faudes::TypeRegistry, faudes::FunctionRegistry, faudes::Documentation, faudes::TypeDefinition, faudes::Integer, faudes::String, faudes::Boolean, faudes::SymbolSet, faudes::SymbolTable, faudes::TTransSet< Cmp >, faudes::vGenerator, faudes::AttributeDiagnoserState, faudes::AttributeFailureEvents, faudes::AttributeFailureTypeMap, faudes::DiagLabelSet, faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::HioEventFlags, faudes::HioStateFlags, faudes::AttributeColoredState, faudes::AttributeTimedTrans, faudes::AttributeTimedState, faudes::AttributeTimedGlobal, faudes::LoggingExecutor, faudes::ParallelExecutor::ParallelTimedState, faudes::ParallelExecutor, faudes::ProposingExecutor, faudes::SimConditionAttribute, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeDeviceEvent, faudes::vDevice, faudes::xDevice, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >, faudes::TTransSet< faudes::TransSort::EvX2X1 >, and faudes::TTransSet< faudes::TransSort::X1EvX2 >.

Definition at line 232 of file rtitypes.cpp.

void faudes::Type::DoDWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const [protected, virtual]

Write configuration data in debugging format to TokenWriter.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Reimplemented in faudes::TBaseSet< T, Cmp >, faudes::TBaseVector< T >, faudes::NameSet, faudes::vGenerator, faudes::TBaseSet< long unsigned int, std::less< long unsigned int > >, faudes::TBaseSet< std::string >, faudes::TBaseSet< long unsigned int >, faudes::TBaseSet< faudes::Transition, faudes::TransSort::EvX2X1 >, faudes::TBaseSet< faudes::Transition, Cmp >, and faudes::TBaseSet< faudes::Transition, faudes::TransSort::X1EvX2 >.

Definition at line 238 of file rtitypes.cpp.

void faudes::Type::DoSWrite ( TokenWriter rTw  )  const [protected, virtual]


Member Data Documentation

const std::string faudes::Type::mName [static, protected]

static default name

Reimplemented in faudes::Signature, faudes::Documentation, and faudes::vDevice.

Definition at line 711 of file rtitypes.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