faudes::DiagLabelSet Class Reference
|
Public Types | |
typedef NameSet::Iterator | Iterator |
Convenience definition of NameSet::Iterator. | |
Public Member Functions | |
DiagLabelSet (void) | |
Constructor for DiagLabelSet with static LabelSymbolTable. | |
DiagLabelSet (SymbolTable *pSymTab) | |
Constructor for DiagLabelSet with specified SymbolTable. | |
DiagLabelSet (const std::string &rFilename, const std::string &rLabel="DiagLabels") | |
Constructor for DiagLabelSet with static LabelSymbolTable. | |
bool | IsDefault (void) const |
Test for default value. | |
void | LabelSymbolTablep (SymbolTable *pSymTab) |
Reset pointer mpSymbolTable. | |
bool | Empty (void) const |
Check if mDiagLabels is empty. | |
Idx | Size (void) const |
Get size of mDiagLabels. | |
bool | Exists (Idx index) const |
Test existence of index. | |
bool | Insert (Idx index) |
Add an element by index. | |
void | InsertSet (const DiagLabelSet &rSet) |
Insert elements of rSet. | |
bool | Erase (Idx index) |
Delete element by index. | |
void | Clear (void) |
Clear mDiagLabels. | |
std::string | Str (void) const |
Prints mDiagLabels to a string. | |
DiagLabelSet | operator* (const DiagLabelSet &rOtherSet) const |
Set intersection operator. | |
DiagLabelSet | operator+ (const DiagLabelSet &rOtherSet) const |
Set union operator. | |
DiagLabelSet | operator- (const DiagLabelSet &rOtherSet) const |
Set difference operator. | |
bool | operator<= (const DiagLabelSet &rOtherSet) const |
Test for subset. | |
bool | operator>= (const DiagLabelSet &rOtherSet) const |
Test for superset. | |
Static Public Member Functions | |
static SymbolTable * | StaticLabelSymbolTablep (void) |
Get pointer to static LabelSymbolTable. | |
static Idx | IndexOfLabelN (void) |
Return index label "normal". | |
static Idx | IndexOfLabelA (void) |
Return index label "ambiguous". | |
static Idx | IndexOfLabelRelN (void) |
Return index label "relatively normal". | |
static Idx | IndexOfLabelSpecViolated (void) |
Return index label "specification violated". | |
static std::string | Symbol (Idx index) |
Symbolic name lookup of element in SymbolTable. | |
Public Attributes | |
NameSet | mDiagLabels |
Set of diagnoser label names. | |
Protected Member Functions | |
void | DoWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const |
Write mDiagLabels to TokenWriter. | |
void | DoXWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const |
Write mDiagLabels to TokenWriter. | |
void | DoRead (TokenReader &rTr, const std::string &rLabel, const Type *pContext) |
Read mDiagLabels from TokenReader. | |
void | DoAssign (const DiagLabelSet &rSrcAttr) |
Copy attribute members. | |
bool | DoEqual (const DiagLabelSet &rOther) const |
Test equality. | |
Static Private Attributes | |
static SymbolTable | msLabelSymbolTable |
Static global symbol table for possible labels of the diagnoser attribute, e.g., N, A, and specific failure labels. | |
static Idx | msLabelN = DiagLabelSet::msLabelSymbolTable.InsEntry("N") |
Static index of label "normal". | |
static Idx | msLabelA = DiagLabelSet::msLabelSymbolTable.InsEntry("A") |
Static index of label "ambiguous". | |
static Idx | msLabelRelN = DiagLabelSet::msLabelSymbolTable.InsEntry("relN") |
Static index of label "relatively normal" (only for diagnoser building purpose). | |
static Idx | msLabelSpecViolated = DiagLabelSet::msLabelSymbolTable.InsEntry("F") |
Static index of label "specification violated". |
Implements the label representation for state estimates.
This class has its own static SymbolTable and label names are stored in mDiagLabels.
Definition at line 19 of file diag_attrlabelset.h.
typedef NameSet::Iterator faudes::DiagLabelSet::Iterator |
Convenience definition of NameSet::Iterator.
Definition at line 43 of file diag_attrlabelset.h.
faudes::DiagLabelSet::DiagLabelSet | ( | void | ) |
Constructor for DiagLabelSet with static LabelSymbolTable.
Definition at line 24 of file diag_attrlabelset.cpp.
faudes::DiagLabelSet::DiagLabelSet | ( | SymbolTable * | pSymTab | ) |
Constructor for DiagLabelSet with specified SymbolTable.
Definition at line 35 of file diag_attrlabelset.cpp.
faudes::DiagLabelSet::DiagLabelSet | ( | const std::string & | rFilename, | |
const std::string & | rLabel = "DiagLabels" | |||
) | [inline] |
Constructor for DiagLabelSet with static LabelSymbolTable.
This version reads a file with given label to find the labels inside the file.
rFilename | Filename | |
rLabel | Token label for the labels in the file; default value "DiagLabels" |
Definition at line 60 of file diag_attrlabelset.h.
void faudes::DiagLabelSet::Clear | ( | void | ) | [virtual] |
Clear mDiagLabels.
Reimplemented from faudes::AttributeVoid.
Definition at line 109 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::DoAssign | ( | const DiagLabelSet & | rSrcAttr | ) | [protected] |
Copy attribute members.
rSrcAttr | Source to copy from |
Definition at line 47 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::DoEqual | ( | const DiagLabelSet & | rOther | ) | const [protected] |
Test equality.
rOther | Attribute to compare with |
Definition at line 53 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::DoRead | ( | TokenReader & | rTr, | |
const std::string & | rLabel, | |||
const Type * | pContext | |||
) | [protected, virtual] |
Read mDiagLabels from TokenReader.
rTr | Reference to TokenReader | |
rLabel | Is ignored. Label of the section is "DiagLabels". | |
pContext | Write context to provide contextual information |
Reimplemented from faudes::AttributeFlags.
Definition at line 161 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::DoWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel, | |||
const Type * | pContext | |||
) | const [protected, virtual] |
Write mDiagLabels to TokenWriter.
rTw | Reference to TokenWriter | |
rLabel | Is ignored. Label of the section is "DiagLabels". | |
pContext | Write context to provide contextual information |
Reimplemented from faudes::AttributeFlags.
Definition at line 149 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::DoXWrite | ( | TokenWriter & | rTw, | |
const std::string & | rLabel, | |||
const Type * | pContext | |||
) | const [protected, virtual] |
Write mDiagLabels to TokenWriter.
rTw | Reference to TokenWriter | |
rLabel | Is ignored. Label of the section is "DiagLabels". | |
pContext | Write context to provide contextual information |
Reimplemented from faudes::AttributeFlags.
Definition at line 155 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::Empty | ( | void | ) | const |
Check if mDiagLabels is empty.
Definition at line 79 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::Erase | ( | Idx | index | ) |
Delete element by index.
The symbolic name is not removed from the SymbolTable.
index | Index to delete. |
Definition at line 104 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::Exists | ( | Idx | index | ) | const |
Test existence of index.
index | Index to test |
Definition at line 89 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelA | ( | void | ) | [static] |
Return index label "ambiguous".
Definition at line 119 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelN | ( | void | ) | [static] |
Return index label "normal".
Definition at line 114 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelRelN | ( | void | ) | [static] |
Return index label "relatively normal".
Definition at line 124 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelSpecViolated | ( | void | ) | [static] |
Return index label "specification violated".
Definition at line 129 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::Insert | ( | Idx | index | ) |
Add an element by index.
Index must be already known to the global SymbolTable.
index | Index to add |
Definition at line 94 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::InsertSet | ( | const DiagLabelSet & | rSet | ) |
Insert elements of rSet.
rSet | Indices of elements to add |
Definition at line 99 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::IsDefault | ( | void | ) | const [virtual] |
Test for default value.
Reimplemented from faudes::AttributeFlags.
Definition at line 64 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::LabelSymbolTablep | ( | SymbolTable * | pSymTab | ) |
Reset pointer mpSymbolTable.
pSymTab | Pointer to new symbol table |
Definition at line 74 of file diag_attrlabelset.cpp.
DiagLabelSet faudes::DiagLabelSet::operator* | ( | const DiagLabelSet & | rOtherSet | ) | const |
Set intersection operator.
Definition at line 166 of file diag_attrlabelset.cpp.
DiagLabelSet faudes::DiagLabelSet::operator+ | ( | const DiagLabelSet & | rOtherSet | ) | const |
Set union operator.
Definition at line 174 of file diag_attrlabelset.cpp.
DiagLabelSet faudes::DiagLabelSet::operator- | ( | const DiagLabelSet & | rOtherSet | ) | const |
Set difference operator.
Definition at line 182 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::operator<= | ( | const DiagLabelSet & | rOtherSet | ) | const |
Test for subset.
Definition at line 191 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::operator>= | ( | const DiagLabelSet & | rOtherSet | ) | const |
Test for superset.
Definition at line 196 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::Size | ( | void | ) | const |
Get size of mDiagLabels.
Definition at line 84 of file diag_attrlabelset.cpp.
SymbolTable * faudes::DiagLabelSet::StaticLabelSymbolTablep | ( | void | ) | [static] |
Get pointer to static LabelSymbolTable.
Definition at line 69 of file diag_attrlabelset.cpp.
string faudes::DiagLabelSet::Str | ( | void | ) | const |
Prints mDiagLabels to a string.
Definition at line 139 of file diag_attrlabelset.cpp.
string faudes::DiagLabelSet::Symbol | ( | Idx | index | ) | [static] |
Symbolic name lookup of element in SymbolTable.
index | Index to look up. |
Definition at line 134 of file diag_attrlabelset.cpp.
Set of diagnoser label names.
Definition at line 38 of file diag_attrlabelset.h.
Idx faudes::DiagLabelSet::msLabelA = DiagLabelSet::msLabelSymbolTable.InsEntry("A") [static, private] |
Static index of label "ambiguous".
Definition at line 30 of file diag_attrlabelset.h.
Idx faudes::DiagLabelSet::msLabelN = DiagLabelSet::msLabelSymbolTable.InsEntry("N") [static, private] |
Static index of label "normal".
Definition at line 28 of file diag_attrlabelset.h.
Idx faudes::DiagLabelSet::msLabelRelN = DiagLabelSet::msLabelSymbolTable.InsEntry("relN") [static, private] |
Static index of label "relatively normal" (only for diagnoser building purpose).
Definition at line 32 of file diag_attrlabelset.h.
Idx faudes::DiagLabelSet::msLabelSpecViolated = DiagLabelSet::msLabelSymbolTable.InsEntry("F") [static, private] |
Static index of label "specification violated".
Definition at line 34 of file diag_attrlabelset.h.
SymbolTable faudes::DiagLabelSet::msLabelSymbolTable [static, private] |
Static global symbol table for possible labels of the diagnoser attribute, e.g., N, A, and specific failure labels.
Definition at line 26 of file diag_attrlabelset.h.
libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen