| |
libFAUDES
Sections
Index
|
faudes::DiagLabelSet Class Reference |
Public Types | |
typedef NameSet::Iterator | Iterator |
Convenience definition of NameSet::Iterator. | |
Public Member Functions | |
virtual DiagLabelSet * | New (void) const |
Construct on heap. | |
virtual DiagLabelSet * | Copy (void) const |
Construct on heap. | |
virtual const DiagLabelSet * | Cast (const Type *pOther) const |
Cast other object to this type. | |
virtual DiagLabelSet & | Assign (const Type &rSrc) |
Assign configuration data from other object. | |
virtual bool | Equal (const Type &rOther) const |
Test equality of configuration data. | |
virtual DiagLabelSet & | operator= (const DiagLabelSet &rSrc) |
virtual bool | operator== (const DiagLabelSet &rOther) const |
virtual bool | operator!= (const DiagLabelSet &rOther) const |
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 | DoRead (TokenReader &rTr, const std::string &rLabel, const Type *pContext) |
Read mDiagLabels from TokenReader. | |
DiagLabelSet & | 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". |
faudes::DiagLabelSet::DiagLabelSet | ( | void | ) | [inline] |
Constructor for DiagLabelSet with static LabelSymbolTable.
Definition at line 46 of file diag_attrlabelset.h.
faudes::DiagLabelSet::DiagLabelSet | ( | SymbolTable * | pSymTab | ) | [inline] |
Constructor for DiagLabelSet with specified SymbolTable.
Definition at line 53 of file diag_attrlabelset.h.
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 68 of file diag_attrlabelset.h.
DiagLabelSet * faudes::DiagLabelSet::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 19 of file diag_attrlabelset.cpp.
DiagLabelSet * faudes::DiagLabelSet::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 19 of file diag_attrlabelset.cpp.
const DiagLabelSet * faudes::DiagLabelSet::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 19 of file diag_attrlabelset.cpp.
DiagLabelSet & faudes::DiagLabelSet::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 19 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::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 19 of file diag_attrlabelset.cpp.
DiagLabelSet & faudes::DiagLabelSet::operator= | ( | const DiagLabelSet & | rSrc | ) | [virtual] |
Definition at line 19 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::operator== | ( | const DiagLabelSet & | rOther | ) | const [virtual] |
Definition at line 19 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::operator!= | ( | const DiagLabelSet & | rOther | ) | const [virtual] |
Definition at line 19 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::IsDefault | ( | void | ) | const [virtual] |
Test for default value.
Reimplemented from faudes::AttributeFlags.
Definition at line 40 of file diag_attrlabelset.cpp.
SymbolTable * faudes::DiagLabelSet::StaticLabelSymbolTablep | ( | void | ) | [static] |
Get pointer to static LabelSymbolTable.
Definition at line 45 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::LabelSymbolTablep | ( | SymbolTable * | pSymTab | ) |
Reset pointer mpSymbolTable.
pSymTab | Pointer to new symbol table |
Definition at line 50 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::Empty | ( | void | ) | const |
Check if mDiagLabels is empty.
Definition at line 55 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::Size | ( | void | ) | const |
Get size of mDiagLabels.
Definition at line 60 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::Exists | ( | Idx | index | ) | const |
Test existence of index.
index | Index to test |
Definition at line 65 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 70 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 75 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 80 of file diag_attrlabelset.cpp.
void faudes::DiagLabelSet::Clear | ( | void | ) | [virtual] |
Clear mDiagLabels.
Reimplemented from faudes::AttributeVoid.
Definition at line 85 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelN | ( | void | ) | [static] |
Return index label "normal".
Definition at line 90 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelA | ( | void | ) | [static] |
Return index label "ambiguous".
Definition at line 95 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelRelN | ( | void | ) | [static] |
Return index label "relatively normal".
Definition at line 100 of file diag_attrlabelset.cpp.
Idx faudes::DiagLabelSet::IndexOfLabelSpecViolated | ( | void | ) | [static] |
Return index label "specification violated".
Definition at line 105 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 110 of file diag_attrlabelset.cpp.
string faudes::DiagLabelSet::Str | ( | void | ) | const |
Prints mDiagLabels to a string.
Definition at line 115 of file diag_attrlabelset.cpp.
DiagLabelSet faudes::DiagLabelSet::operator* | ( | const DiagLabelSet & | rOtherSet | ) | const |
Set intersection operator.
Definition at line 136 of file diag_attrlabelset.cpp.
DiagLabelSet faudes::DiagLabelSet::operator+ | ( | const DiagLabelSet & | rOtherSet | ) | const |
Set union operator.
Definition at line 144 of file diag_attrlabelset.cpp.
DiagLabelSet faudes::DiagLabelSet::operator- | ( | const DiagLabelSet & | rOtherSet | ) | const |
Set difference operator.
Definition at line 152 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::operator<= | ( | const DiagLabelSet & | rOtherSet | ) | const |
bool faudes::DiagLabelSet::operator>= | ( | const DiagLabelSet & | rOtherSet | ) | const |
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 125 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 131 of file diag_attrlabelset.cpp.
DiagLabelSet & faudes::DiagLabelSet::DoAssign | ( | const DiagLabelSet & | rSrcAttr | ) | [protected] |
Copy attribute members.
rSrcAttr | Source to copy from |
Definition at line 22 of file diag_attrlabelset.cpp.
bool faudes::DiagLabelSet::DoEqual | ( | const DiagLabelSet & | rOther | ) | const [protected] |
Test equality.
rOther | Attribute to compare with |
Definition at line 29 of file diag_attrlabelset.cpp.
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.
Idx faudes::DiagLabelSet::msLabelN = DiagLabelSet::msLabelSymbolTable.InsEntry("N") [static, private] |
Idx faudes::DiagLabelSet::msLabelA = DiagLabelSet::msLabelSymbolTable.InsEntry("A") [static, private] |
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] |
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6