|
libFAUDES
Sections
Index
|
faudes::Type Class Reference
|
Public Member Functions | |
Type (void) | |
Constructor. | |
Type (const Type &rType) | |
Copy constructor. | |
virtual | ~Type (void) |
Destructor. | |
virtual Type * | New (void) const |
Construct on heap. | |
virtual Type * | Copy (void) const |
Construct on heap. | |
virtual const Type * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual void | Clear (void) |
Clear configuration data. | |
virtual Type & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual Type & | operator= (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 Type & | DoAssign (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 |
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 assignment, factory functions, and token IO.
We think of a faudes-typed object to be configured by defining data and, in due course, manipulated via its public interface by faudes-functions. Any faudes-type must provide a Clear() method that resets the object configuration to a unique default value. It is the configuration data that can be read from and written to token streams, and it is the configuration data that is used for assigments. Any additional data a faudes-typed object may host, is ignored by the interface provided inherited from the the base faudes::Type. Examples for such additional data is the unique id of a Generator, and the deferred copy pointers in faudes sets derived from faudes::TBaseSet.
The faudes::Type assignment semantics are not meant to create exact copies of a given source object. Thogether with the uniquely defined default value, we can have assignments by both up- and downcasts. A faudes::Generator can be assigned from the derived faudes::System (a Generator with controllability attributes) by dropping the extra features. Vice versa, when a System is assigned from a plain Generator, any extra features take their respective default values. This relaxed interpretation of assignments is implemented by the method Assign(). The token format for file IO is organised in a similar fashion: any generator derivate can be configured from the token stream produced by any other generator class. In contrast, faudes-typed objects also implement an assignment operator that uses the standard C++ conventions.
The follwoing methods are used to implement the faudes::Type interface:
In most cases, only DoRead(), DoWrite(), DoAssign() and DoEqual() need to me implemented manualy. the other methods can be declared and implemented by macros FAUDES_TYPE_DELARATION and FAUDES_TYPE_IMPLEMENTATION, respectively. The various Attribute classes illustrate their ussage.
Definition at line 226 of file cfl_types.h.
faudes::Type::Type | ( | void | ) |
Constructor.
Definition at line 43 of file cfl_types.cpp.
faudes::Type::Type | ( | const Type & | rType | ) |
Copy constructor.
Definition at line 46 of file cfl_types.cpp.
faudes::Type::~Type | ( | void | ) | [virtual] |
Destructor.
Definition at line 49 of file cfl_types.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 downcatsed 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 in faudes::vGenerator.
Definition at line 72 of file cfl_types.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 in faudes::TaBaseSet< T, Attr, Cmp >, faudes::Integer, faudes::String, faudes::Boolean, faudes::TaBaseSet< Idx, AttributeSimplenetEvent >, faudes::TaBaseSet< Transition, Attr, TransSort::X1EvX2 >, faudes::TaBaseSet< Idx, EventAttr >, faudes::TaBaseSet< Idx, HioEventFlags >, faudes::TaBaseSet< Idx, AttributeSignalEvent >, faudes::TaBaseSet< Idx, DiagLabelSet >, faudes::TaBaseSet< Idx, StateAttr >, faudes::TaBaseSet< Idx, AttributeFailureEvents >, faudes::TaBaseSet< Idx, AttributeSimCondition >, faudes::TaBaseSet< Idx, SimEventAttribute >, faudes::TaBaseSet< Idx, HioStateFlags >, and faudes::TaBaseSet< Idx, Attr >.
Definition at line 62 of file cfl_types.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::vBaseVector, faudes::Signature, faudes::FunctionDefinition, faudes::vGenerator, faudes::TaIndexSet< Attr >, faudes::TypeRegistry, faudes::FunctionRegistry, faudes::SymbolTable, faudes::TaTransSet< Attr >, faudes::Documentation, faudes::TypeDefinition, 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::LuaFunctionDefinition, faudes::TaBaseSet< Idx, AttributeSimplenetEvent >, faudes::TaBaseSet< Transition, Attr, TransSort::X1EvX2 >, faudes::TaBaseSet< Idx, EventAttr >, faudes::TaBaseSet< Idx, HioEventFlags >, faudes::TaBaseSet< Idx, AttributeSignalEvent >, faudes::TaBaseSet< Idx, DiagLabelSet >, faudes::TaBaseSet< Idx, StateAttr >, faudes::TaBaseSet< Idx, AttributeFailureEvents >, faudes::TaBaseSet< Idx, AttributeSimCondition >, faudes::TaBaseSet< Idx, SimEventAttribute >, faudes::TaBaseSet< Idx, HioStateFlags >, faudes::TaBaseSet< Idx, Attr >, faudes::TaGenerator< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, TransSort::EvX2X1 >, faudes::TBaseSet< Idx, std::less< Idx > >, faudes::TBaseSet< Transition, TransSort::X1EvX2 >, faudes::TBaseSet< Transition, Cmp >, faudes::TaIndexSet< DiagLabelSet >, faudes::TaIndexSet< HioStateFlags >, and faudes::TaIndexSet< StateAttr >.
Definition at line 67 of file cfl_types.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.
Reimplemented in faudes::TaBaseSet< T, Attr, Cmp >, faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::Integer, faudes::String, faudes::Boolean, faudes::vGenerator, faudes::EventRelabelMap, faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, 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::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TaBaseSet< Idx, AttributeSimplenetEvent >, faudes::TaBaseSet< Transition, Attr, TransSort::X1EvX2 >, faudes::TaBaseSet< Idx, EventAttr >, faudes::TaBaseSet< Idx, HioEventFlags >, faudes::TaBaseSet< Idx, AttributeSignalEvent >, faudes::TaBaseSet< Idx, DiagLabelSet >, faudes::TaBaseSet< Idx, StateAttr >, faudes::TaBaseSet< Idx, AttributeFailureEvents >, faudes::TaBaseSet< Idx, AttributeSimCondition >, faudes::TaBaseSet< Idx, SimEventAttribute >, faudes::TaBaseSet< Idx, HioStateFlags >, faudes::TaBaseSet< Idx, Attr >, faudes::TaGenerator< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioConstraint< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioController< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioEnvironment< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, and faudes::THioPlant< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >.
Definition at line 57 of file cfl_types.cpp.
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.
rSrc | Source to copy from |
Definition at line 101 of file cfl_types.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.
rTw | Reference to TokenWriter | |
rLabel | Label of section to write | |
pContext | Write context to provide contextual information |
Exception |
|
Reimplemented in faudes::TBaseSet< T, Cmp >, faudes::vBaseVector, faudes::vGenerator, faudes::NameSet, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, TransSort::EvX2X1 >, faudes::TBaseSet< Idx, std::less< Idx > >, faudes::TBaseSet< Transition, TransSort::X1EvX2 >, and faudes::TBaseSet< Transition, Cmp >.
Definition at line 238 of file cfl_types.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.
rOther | Other object to compare with. |
Definition at line 107 of file cfl_types.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.
rTr | TokenReader to read from | |
rLabel | Section to read | |
pContext | Read context to provide contextual information |
Exception |
|
Reimplemented in faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::vBaseVector, faudes::AttributeCFlags, faudes::Integer, faudes::String, faudes::Boolean, faudes::Signature, faudes::FunctionDefinition, faudes::vGenerator, faudes::IndexSet, faudes::NameSet, faudes::SymbolSet, faudes::SymbolTable, faudes::Documentation, faudes::TypeDefinition, 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::AttributeSimCondition, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeDeviceEvent, faudes::vDevice, faudes::xDevice, faudes::LuaFunctionDefinition, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, TransSort::EvX2X1 >, faudes::TBaseSet< Idx, std::less< Idx > >, faudes::TBaseSet< Transition, TransSort::X1EvX2 >, and faudes::TBaseSet< Transition, Cmp >.
Definition at line 252 of file cfl_types.cpp.
void faudes::Type::DoSWrite | ( | TokenWriter & | rTw | ) | const [protected, virtual] |
Write statistical data as a comment to TokenWriter.
Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.
rTw | Reference to TokenWriter |
Exception |
|
Reimplemented in faudes::TBaseSet< T, Cmp >, faudes::vBaseVector, faudes::vGenerator, faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, TransSort::EvX2X1 >, faudes::TBaseSet< Idx, std::less< Idx > >, faudes::TBaseSet< Transition, TransSort::X1EvX2 >, and faudes::TBaseSet< Transition, Cmp >.
Definition at line 244 of file cfl_types.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.
rTw | Reference to TokenWriter | |
rLabel | Label of section to write | |
pContext | Write context to provide contextual information |
Exception |
|
Reimplemented in faudes::AttributeVoid, faudes::AttributeFlags, faudes::TBaseSet< T, Cmp >, faudes::vBaseVector, faudes::AttributeCFlags, faudes::Integer, faudes::String, faudes::Boolean, faudes::Signature, faudes::FunctionDefinition, faudes::Function, faudes::vGenerator, faudes::IndexSet, faudes::NameSet, faudes::TypeRegistry, faudes::FunctionRegistry, faudes::SymbolSet, faudes::SymbolTable, faudes::TTransSet< Cmp >, faudes::Documentation, faudes::TypeDefinition, 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::AttributeSimCondition, faudes::SimEventAttribute, faudes::AttributeSignalActuator, faudes::AttributeSignalSensor, faudes::AttributeSimplenetActuator, faudes::AttributeSimplenetSensor, faudes::AttributeDeviceEvent, faudes::vDevice, faudes::xDevice, faudes::LuaFunctionDefinition, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, TransSort::EvX2X1 >, faudes::TBaseSet< Idx, std::less< Idx > >, faudes::TBaseSet< Transition, TransSort::X1EvX2 >, faudes::TBaseSet< Transition, Cmp >, faudes::TTransSet< TransSort::X1EvX2 >, and faudes::TTransSet< TransSort::EvX2X1 >.
Definition at line 232 of file cfl_types.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.
rTw | Reference to TokenWriter | |
rLabel | Label of section to write | |
pContext | Write context to provide contextual information |
Exception |
|
Definition at line 196 of file cfl_types.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.
pFileName | Name of file | |
rLabel | Label of section to write | |
pContext | Write context to provide contextual information | |
openmode | ios::openmode |
Exception |
|
Definition at line 182 of file cfl_types.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.
pContext | Write context to provide contextual information |
Definition at line 176 of file cfl_types.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 or id (if any) is not considered 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 object to compare with. |
Definition at line 79 of file cfl_types.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.
rString | String to read from | |
rLabel | Section to read | |
pContext | Read context to provide contextual information |
Definition at line 225 of file cfl_types.cpp.
const std::string & faudes::Type::Name | ( | void | ) | const [virtual] |
Get objects's name.
The base class Type does not implement an object name, derivatives usually do so, except for attributes.
Reimplemented in faudes::TBaseSet< T, Cmp >, faudes::vBaseVector, faudes::Signature, faudes::vGenerator, faudes::SymbolTable, faudes::Documentation, faudes::Executor, faudes::vDevice, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, TransSort::EvX2X1 >, faudes::TBaseSet< Idx, std::less< Idx > >, faudes::TBaseSet< Transition, TransSort::X1EvX2 >, and faudes::TBaseSet< Transition, Cmp >.
Definition at line 117 of file cfl_types.cpp.
void faudes::Type::Name | ( | const std::string & | rName | ) | [virtual] |
Set the objects's name.
The base class Type does not implement an object name, derivatives usually do so, except for attributes.
rName | Name |
Reimplemented in faudes::TBaseSet< T, Cmp >, faudes::vBaseVector, faudes::Signature, faudes::vGenerator, faudes::SymbolTable, faudes::Documentation, faudes::vDevice, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, TransSort::EvX2X1 >, faudes::TBaseSet< Idx, std::less< Idx > >, faudes::TBaseSet< Transition, TransSort::X1EvX2 >, and faudes::TBaseSet< Transition, Cmp >.
Definition at line 113 of file cfl_types.cpp.
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.
Reimplemented in faudes::TaBaseSet< T, Attr, Cmp >, faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::Integer, faudes::String, faudes::Boolean, faudes::Function, faudes::vGenerator, faudes::EventRelabelMap, faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, 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::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::LuaFunction, faudes::TaBaseSet< Idx, AttributeSimplenetEvent >, faudes::TaBaseSet< Transition, Attr, TransSort::X1EvX2 >, faudes::TaBaseSet< Idx, EventAttr >, faudes::TaBaseSet< Idx, HioEventFlags >, faudes::TaBaseSet< Idx, AttributeSignalEvent >, faudes::TaBaseSet< Idx, DiagLabelSet >, faudes::TaBaseSet< Idx, StateAttr >, faudes::TaBaseSet< Idx, AttributeFailureEvents >, faudes::TaBaseSet< Idx, AttributeSimCondition >, faudes::TaBaseSet< Idx, SimEventAttribute >, faudes::TaBaseSet< Idx, HioStateFlags >, faudes::TaBaseSet< Idx, Attr >, faudes::TaGenerator< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioConstraint< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioController< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, faudes::THioEnvironment< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >, and faudes::THioPlant< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid >.
Definition at line 52 of file cfl_types.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.
rOther | Other objevt to compare with. |
Definition at line 89 of file cfl_types.cpp.
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.
rSrc | Source to copy from |
Definition at line 94 of file cfl_types.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 or id is not considered 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.
rOther | Other object to compare with. |
Definition at line 84 of file cfl_types.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.
rTr | Reference to tokenreader | |
rLabel | Section to read | |
pContext | Read context to provide contextual information |
Definition at line 219 of file cfl_types.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.
rFileName | Name of file | |
rLabel | Section to read from | |
pContext | Read context to provide contextual information |
Definition at line 212 of file cfl_types.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 cfl_types.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.
rTw | Reference to TokenWriter |
Exception |
|
Definition at line 207 of file cfl_types.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.
Exception |
|
Definition at line 160 of file cfl_types.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.
rLabel | Label of section to write | |
pContext | Write context to provide contextual information |
Exception |
|
Definition at line 152 of file cfl_types.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.
rLabel | Label of section to write | |
pContext | Write context to provide contextual information |
Exception |
|
Definition at line 168 of file cfl_types.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.
rTw | Reference to TokenWriter | |
rLabel | Label of section to write | |
pContext | Write context to provide contextual information |
Exception |
|
Definition at line 147 of file cfl_types.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.
pFileName | Name of file | |
openmode | ios::openmode |
Exception |
|
Definition at line 142 of file cfl_types.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.
pFileName | Name of file | |
rLabel | Label of section to write | |
pContext | Write context to provide contextual information | |
openmode | ios::openmode |
Exception |
|
Definition at line 128 of file cfl_types.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.
pContext | Write context to provide contextual information |
Definition at line 122 of file cfl_types.cpp.
const std::string faudes::Type::mName [static, protected] |
static default name
Reimplemented in faudes::Signature, faudes::Documentation, and faudes::vDevice.
Definition at line 732 of file cfl_types.h.
libFAUDES 2.16b --- 2010-9-8 --- c++ source docu by doxygen 1.6.3