#include <attributes.h>
Inheritance diagram for faudes::AttributeVoid:
Attributes are used as template parameters for faudes containers and generators and facilitate the modelling of customized properties of events, states and transitions. The AttributeVoid class defines the minimal interface of faudes attributes and therefore is the designated base class for all attribute implementations. The AttributeVoid class does not define any actual properties. See AttributeFlags for a non-trivial example.
Definition at line 43 of file attributes.h.
Public Member Functions | |
AttributeVoid (void) | |
Constructor. | |
virtual | ~AttributeVoid (void) |
Destructor. | |
void | Write (const std::string &rLabel="", const Type *pContext=0) const |
Write attribute 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 attribute to a file. | |
void | Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
Write attribute to TokenWriter. | |
std::string | ToString (const std::string &rLabel="", const Type *pContext=0) const |
Write attribute to a string. | |
void | Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0) |
Read from file with label specified. | |
void | Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
Read from TokenReader with label sepcified. | |
bool | IsDefault (void) const |
Test for default value. | |
void | SetDefault (void) |
Set to fefault value. | |
void | Clear (void) |
Synonym for SetDefault to match std interface. | |
Protected Member Functions | |
virtual void | DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
Actual read method to read attribute from tokenreader. | |
virtual void | DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
Actual write method to write the attribute to a TokenWriter. | |
void | Skip (TokenReader &rTr) |
Skip attribute tokens. |
|
Constructor.
Definition at line 47 of file attributes.h. |
|
Destructor.
Definition at line 50 of file attributes.h. |
|
Synonym for SetDefault to match std interface.
Definition at line 168 of file attributes.h. |
|
Actual read method to read attribute from tokenreader. For the base class AttributeVoid, this method skips all tokens until a String or Integer token indicates the end of all attribute values. For derived attributue classes, this method must either read all tokens that belong to the respective attribute, or none. It may thorw exceptions on token mismatch within the relevant attribute, but it may not throw exceptions when it encounters tokens that possibly belong to another attribute.
Reimplemented in faudes::AttributeFlags, faudes::AttributeCFlags, faudes::SimConditionAttribute, faudes::SimEventAttribute, faudes::AttributeTimedTrans, faudes::AttributeTimedState, and faudes::AttributeTimedGlobal. Definition at line 87 of file attributes.cpp. |
|
Actual write method to write the attribute to a TokenWriter. Reimplement this method for derived attribute classes to define the token io format.
Reimplemented in faudes::AttributeFlags, faudes::AttributeCFlags, faudes::SimConditionAttribute, faudes::SimEventAttribute, faudes::AttributeTimedTrans, faudes::AttributeTimedState, and faudes::AttributeTimedGlobal. Definition at line 81 of file attributes.cpp. |
|
Test for default value.
Reimplemented in faudes::AttributeFlags, faudes::AttributeCFlags, faudes::SimConditionAttribute, faudes::SimEventAttribute, faudes::AttributeTimedTrans, faudes::AttributeTimedState, and faudes::AttributeTimedGlobal. Definition at line 158 of file attributes.h. |
|
Read from TokenReader with label sepcified. Note: all read functions use the virtual function DoRead(), to be reimplemented for by derived attribute classes.
Definition at line 74 of file attributes.cpp. |
|
Read from file with label specified. Note: all read functions use the virtual function DoRead(), to be reimplemented for by derived attribute classes.
Definition at line 67 of file attributes.cpp. |
|
Set to fefault value.
Definition at line 163 of file attributes.h. |
|
Skip attribute tokens. Helper method to be called after all sttribute derived classes had their to read their data. It skips all tokens and sections until it reached a String or decimal Integer.
Definition at line 93 of file attributes.cpp. |
|
Write attribute to a string. Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived attributes.
Definition at line 60 of file attributes.cpp. |
|
Write attribute to TokenWriter. Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived attributes.
Definition at line 55 of file attributes.cpp. |
|
Write attribute to a file. Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived attributes.
Definition at line 41 of file attributes.cpp. |
|
Write attribute to console. Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived attributes.
Definition at line 35 of file attributes.cpp. |