| |
libFAUDES
Sections
Index
|
faudes::AttributeDiagnoserState Class Reference |
Public Member Functions | |
virtual AttributeDiagnoserState * | New (void) const |
Construct on heap. | |
virtual AttributeDiagnoserState * | Copy (void) const |
Construct on heap. | |
virtual const AttributeDiagnoserState * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual AttributeDiagnoserState & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual bool | Equal (const Type &rOther) const |
Test equality of configuration data. | |
virtual AttributeDiagnoserState & | operator= (const AttributeDiagnoserState &rSrc) |
virtual bool | operator== (const AttributeDiagnoserState &rOther) const |
virtual bool | operator!= (const AttributeDiagnoserState &rOther) const |
AttributeDiagnoserState (void) | |
Default constructor. | |
~AttributeDiagnoserState (void) | |
Destructor. | |
bool | IsDefault (void) const |
Test for default value. | |
virtual void | Clear (void) |
Delete the mDiagnoserStateMap. | |
const TaIndexSet< DiagLabelSet > & | DiagnoserStateMap (void) const |
Get mDiagnoserStateMap. | |
const TaIndexSet< DiagLabelSet > * | DiagnoserStateMapp (void) const |
Get pointer to mDiagnoserStateMap. | |
void | DiagnoserStateMap (const TaIndexSet< DiagLabelSet > &newDiagStateMap) |
Set mDiagnoserStateMap. | |
void | AddStateLabelMapping (Idx state, Idx label) |
Add single value of state estimate to mDiagnoserStateMap. | |
void | AddStateLabelMap (Idx gstate, const DiagLabelSet &labels) |
Add state estimates to mDiagnoserStateMap. | |
std::string | Str (void) const |
Pretty printable string of mDiagnoserStateMap. | |
bool | ExistsState (Idx state) const |
Check whether state estimate exists in mDiagnoserStateMap. | |
Protected Member Functions | |
AttributeDiagnoserState & | DoAssign (const AttributeDiagnoserState &rSrc) |
Copy attribute members. | |
bool | DoEqual (const AttributeDiagnoserState &rOther) const |
Test equality. | |
void | DoWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const |
Write mDiagnoserStateMap to TokenWriter. | |
void | DoRead (TokenReader &rTr, const std::string &rLabel, const Type *pContext) |
Read mDiagnoserStateMap from TokenReader. | |
Private Attributes | |
TaIndexSet< DiagLabelSet > | mDiagnoserStateMap |
The diagnoser state attribute is a map of state indices of the original generator to their failure label sets. |
faudes::AttributeDiagnoserState::AttributeDiagnoserState | ( | void | ) | [inline] |
faudes::AttributeDiagnoserState::~AttributeDiagnoserState | ( | void | ) | [inline] |
AttributeDiagnoserState * faudes::AttributeDiagnoserState::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_attrdiagstate.cpp.
AttributeDiagnoserState * faudes::AttributeDiagnoserState::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_attrdiagstate.cpp.
const AttributeDiagnoserState * faudes::AttributeDiagnoserState::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_attrdiagstate.cpp.
AttributeDiagnoserState & faudes::AttributeDiagnoserState::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_attrdiagstate.cpp.
bool faudes::AttributeDiagnoserState::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_attrdiagstate.cpp.
AttributeDiagnoserState & faudes::AttributeDiagnoserState::operator= | ( | const AttributeDiagnoserState & | rSrc | ) | [virtual] |
Definition at line 12 of file diag_attrdiagstate.cpp.
bool faudes::AttributeDiagnoserState::operator== | ( | const AttributeDiagnoserState & | rOther | ) | const [virtual] |
Definition at line 12 of file diag_attrdiagstate.cpp.
bool faudes::AttributeDiagnoserState::operator!= | ( | const AttributeDiagnoserState & | rOther | ) | const [virtual] |
Definition at line 12 of file diag_attrdiagstate.cpp.
bool faudes::AttributeDiagnoserState::IsDefault | ( | void | ) | const [virtual] |
Test for default value.
Reimplemented from faudes::AttributeFlags.
Definition at line 22 of file diag_attrdiagstate.cpp.
void faudes::AttributeDiagnoserState::Clear | ( | void | ) | [virtual] |
Delete the mDiagnoserStateMap.
Reimplemented from faudes::AttributeVoid.
Definition at line 27 of file diag_attrdiagstate.cpp.
const TaIndexSet< DiagLabelSet > & faudes::AttributeDiagnoserState::DiagnoserStateMap | ( | void | ) | const |
Get mDiagnoserStateMap.
Definition at line 32 of file diag_attrdiagstate.cpp.
const TaIndexSet< DiagLabelSet > * faudes::AttributeDiagnoserState::DiagnoserStateMapp | ( | void | ) | const |
Get pointer to mDiagnoserStateMap.
Definition at line 37 of file diag_attrdiagstate.cpp.
void faudes::AttributeDiagnoserState::DiagnoserStateMap | ( | const TaIndexSet< DiagLabelSet > & | newDiagStateMap | ) |
Set mDiagnoserStateMap.
newDiagStateMap | New DiagnoserStateMap |
Definition at line 42 of file diag_attrdiagstate.cpp.
Add single value of state estimate to mDiagnoserStateMap.
state | Index of generator state estimate. | |
label | Index of associated failure label. |
Definition at line 47 of file diag_attrdiagstate.cpp.
void faudes::AttributeDiagnoserState::AddStateLabelMap | ( | Idx | gstate, | |
const DiagLabelSet & | labels | |||
) |
Add state estimates to mDiagnoserStateMap.
gstate | Index of generator state estimate. | |
labels | Index of associated failure labels. |
Definition at line 60 of file diag_attrdiagstate.cpp.
string faudes::AttributeDiagnoserState::Str | ( | void | ) | const |
Pretty printable string of mDiagnoserStateMap.
Definition at line 77 of file diag_attrdiagstate.cpp.
bool faudes::AttributeDiagnoserState::ExistsState | ( | Idx | state | ) | const |
Check whether state estimate exists in mDiagnoserStateMap.
state | Index of state to check. |
Definition at line 95 of file diag_attrdiagstate.cpp.
AttributeDiagnoserState & faudes::AttributeDiagnoserState::DoAssign | ( | const AttributeDiagnoserState & | rSrc | ) | [protected] |
Copy attribute members.
rSrc | Source to copy from |
Definition at line 15 of file diag_attrdiagstate.cpp.
bool faudes::AttributeDiagnoserState::DoEqual | ( | const AttributeDiagnoserState & | rOther | ) | const [protected] |
Test equality.
rOther | Attribute to compare with |
Definition at line 116 of file diag_attrdiagstate.cpp.
void faudes::AttributeDiagnoserState::DoWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel, | |||
const Type * | pContext | |||
) | const [protected, virtual] |
Write mDiagnoserStateMap to TokenWriter.
rTw | Reference to TokenWriter | |
rLabel | Is ignored. Label of the section is "StateEstimates". | |
pContext | Write context to provide contextual information |
Reimplemented from faudes::AttributeFlags.
Definition at line 100 of file diag_attrdiagstate.cpp.
void faudes::AttributeDiagnoserState::DoRead | ( | TokenReader & | rTr, | |
const std::string & | rLabel, | |||
const Type * | pContext | |||
) | [protected, virtual] |
Read mDiagnoserStateMap from TokenReader.
rTr | Reference to TokenReader | |
rLabel | Is ignored. Label of the section is "StateEstimates". | |
pContext | Read context to provide contextual information |
Reimplemented from faudes::AttributeFlags.
Definition at line 106 of file diag_attrdiagstate.cpp.
The diagnoser state attribute is a map of state indices of the original generator to their failure label sets.
The whole map represents one state label of one particular state.
Definition at line 30 of file diag_attrdiagstate.h.
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6