| |
libFAUDES
Sections
Index
|
faudes::AttributeFailureTypeMap Class Reference |
Public Member Functions | |
virtual AttributeFailureTypeMap * | New (void) const |
Construct on heap. | |
virtual AttributeFailureTypeMap * | Copy (void) const |
Construct on heap. | |
virtual const AttributeFailureTypeMap * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual AttributeFailureTypeMap & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual bool | Equal (const Type &rOther) const |
Test equality of configuration data. | |
virtual AttributeFailureTypeMap & | operator= (const AttributeFailureTypeMap &rSrc) |
virtual bool | operator== (const AttributeFailureTypeMap &rOther) const |
virtual bool | operator!= (const AttributeFailureTypeMap &rOther) const |
AttributeFailureTypeMap (void) | |
Default constructor. | |
AttributeFailureTypeMap (const std::string &rFilename) | |
Constructor from file. | |
AttributeFailureTypeMap (const AttributeFailureTypeMap &rOtherAttr) | |
Copyconstructor. | |
~AttributeFailureTypeMap (void) | |
Default destructor. | |
bool | IsDefault (void) const |
Test for default value. | |
bool | Empty (void) const |
Test if mFailureTypeMap is empty. | |
void | Clear (void) |
Clears mFailureTypeMap. | |
Idx | AddFailureTypeMapping (const std::string &failureType, const EventSet &rfailureEvents) |
Add a set of failure events to failure type map. | |
void | AddFailureTypeMap (const std::map< std::string, EventSet > &rFailureMap) |
Inserts entire failure type map to mFailureTypeMap. | |
Idx | FailureType (Idx failureEvent) const |
Returns failure type of failure event. | |
EventSet | AllFailureEvents (void) const |
Obtain all failure events in mFailureTypeMap. | |
Public Attributes | |
TaNameSet< AttributeFailureEvents > | mFailureTypeMap |
Failure and indicator event partition. | |
Protected Member Functions | |
void | DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
Write mFailureTypeMap to TokenWriter. | |
void | DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
Read mFailureTypeMap from TokenReader. | |
AttributeFailureTypeMap & | DoAssign (const AttributeFailureTypeMap &rSrcAttr) |
Copy attribute members. | |
bool | DoEqual (const AttributeFailureTypeMap &rAttr) const |
Test equality. |
faudes::AttributeFailureTypeMap::AttributeFailureTypeMap | ( | void | ) | [inline] |
faudes::AttributeFailureTypeMap::AttributeFailureTypeMap | ( | const std::string & | rFilename | ) | [inline] |
faudes::AttributeFailureTypeMap::AttributeFailureTypeMap | ( | const AttributeFailureTypeMap & | rOtherAttr | ) | [inline] |
faudes::AttributeFailureTypeMap::~AttributeFailureTypeMap | ( | void | ) | [inline] |
AttributeFailureTypeMap * faudes::AttributeFailureTypeMap::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 12 of file diag_attrfailuretypes.cpp.
AttributeFailureTypeMap * faudes::AttributeFailureTypeMap::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 12 of file diag_attrfailuretypes.cpp.
const AttributeFailureTypeMap * faudes::AttributeFailureTypeMap::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 12 of file diag_attrfailuretypes.cpp.
AttributeFailureTypeMap & faudes::AttributeFailureTypeMap::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 12 of file diag_attrfailuretypes.cpp.
bool faudes::AttributeFailureTypeMap::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 12 of file diag_attrfailuretypes.cpp.
AttributeFailureTypeMap & faudes::AttributeFailureTypeMap::operator= | ( | const AttributeFailureTypeMap & | rSrc | ) | [virtual] |
Definition at line 12 of file diag_attrfailuretypes.cpp.
bool faudes::AttributeFailureTypeMap::operator== | ( | const AttributeFailureTypeMap & | rOther | ) | const [virtual] |
Definition at line 12 of file diag_attrfailuretypes.cpp.
bool faudes::AttributeFailureTypeMap::operator!= | ( | const AttributeFailureTypeMap & | rOther | ) | const [virtual] |
Definition at line 12 of file diag_attrfailuretypes.cpp.
bool faudes::AttributeFailureTypeMap::IsDefault | ( | void | ) | const [virtual] |
Test for default value.
Reimplemented from faudes::AttributeFlags.
Definition at line 33 of file diag_attrfailuretypes.cpp.
bool faudes::AttributeFailureTypeMap::Empty | ( | void | ) | const |
Test if mFailureTypeMap is empty.
Definition at line 38 of file diag_attrfailuretypes.cpp.
void faudes::AttributeFailureTypeMap::Clear | ( | void | ) | [virtual] |
Clears mFailureTypeMap.
Reimplemented from faudes::AttributeVoid.
Definition at line 43 of file diag_attrfailuretypes.cpp.
Idx faudes::AttributeFailureTypeMap::AddFailureTypeMapping | ( | const std::string & | failureType, | |
const EventSet & | rfailureEvents | |||
) |
Add a set of failure events to failure type map.
Make sure that you do not insert a failure event which is part of another failure type as well!
failureType | Name of failure type | |
rfailureEvents | Associated failure events |
Exception |
|
Definition at line 48 of file diag_attrfailuretypes.cpp.
void faudes::AttributeFailureTypeMap::AddFailureTypeMap | ( | const std::map< std::string, EventSet > & | rFailureMap | ) |
Inserts entire failure type map to mFailureTypeMap.
rFailureMap | Mapping of failure type names to failure events |
Definition at line 73 of file diag_attrfailuretypes.cpp.
Returns failure type of failure event.
failureEvent | Index of failure event. |
Definition at line 83 of file diag_attrfailuretypes.cpp.
EventSet faudes::AttributeFailureTypeMap::AllFailureEvents | ( | void | ) | const |
Obtain all failure events in mFailureTypeMap.
Definition at line 95 of file diag_attrfailuretypes.cpp.
void faudes::AttributeFailureTypeMap::DoWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | const [protected, virtual] |
Write mFailureTypeMap to TokenWriter.
rTw | Reference to TokenWriter | |
rLabel | Is ignored. Failure events are written in a section "FailureEvents" and indicator events in a separate section "IndicatorEvents". | |
pContext | Write context to provide contextual information |
Reimplemented from faudes::AttributeFlags.
Definition at line 109 of file diag_attrfailuretypes.cpp.
void faudes::AttributeFailureTypeMap::DoRead | ( | TokenReader & | rTr, | |
const std::string & | rLabel = "" , |
|||
const Type * | pContext = 0 | |||
) | [protected, virtual] |
Read mFailureTypeMap from TokenReader.
rTr | Reference to TokenReader | |
rLabel | Is ignored. Failure events are read from section "FailureEvents" and indicator events from section "IndicatorEvents". | |
pContext | Write context to provide contextual information |
Reimplemented from faudes::AttributeFlags.
Definition at line 115 of file diag_attrfailuretypes.cpp.
AttributeFailureTypeMap & faudes::AttributeFailureTypeMap::DoAssign | ( | const AttributeFailureTypeMap & | rSrcAttr | ) | [protected] |
Copy attribute members.
rSrcAttr | Source to copy from |
Definition at line 15 of file diag_attrfailuretypes.cpp.
bool faudes::AttributeFailureTypeMap::DoEqual | ( | const AttributeFailureTypeMap & | rAttr | ) | const [protected] |
Test equality.
rAttr | Other attribute to compare with |
Definition at line 22 of file diag_attrfailuretypes.cpp.
Failure and indicator event partition.
Mapping of failure type indices (as defined in GlobalEventSymbolTable) to associated failure events and indicator events.
Definition at line 28 of file diag_attrfailuretypes.h.
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6