#include <diag_attrlabelset.h>

Public Types

typedef NameSet::Iterator Iterator
 

Public Member Functions

 DiagLabelSet (void)
 
 DiagLabelSet (SymbolTable *pSymTab)
 
 DiagLabelSet (const std::string &rFilename, const std::string &rLabel="DiagLabels")
 
bool IsDefault (void) const
 
void LabelSymbolTablep (SymbolTable *pSymTab)
 
bool Empty (void) const
 
Idx Size (void) const
 
bool Exists (Idx index) const
 
bool Insert (Idx index)
 
void InsertSet (const DiagLabelSet &rSet)
 
bool Erase (Idx index)
 
void Clear (void)
 
std::string Str (void) const
 
DiagLabelSet operator* (const DiagLabelSet &rOtherSet) const
 
DiagLabelSet operator+ (const DiagLabelSet &rOtherSet) const
 
DiagLabelSet operator- (const DiagLabelSet &rOtherSet) const
 
bool operator<= (const DiagLabelSet &rOtherSet) const
 
bool operator>= (const DiagLabelSet &rOtherSet) const
 
- Public Member Functions inherited from faudes::AttributeFlags
 AttributeFlags (void)
 
 AttributeFlags (const AttributeFlags &rOther)
 
virtual ~AttributeFlags (void)
 
bool Test (fType mask) const
 
bool TestAll (fType mask) const
 
bool TestSome (fType mask) const
 
bool TestNone (fType mask) const
 
void Set (fType mask)
 
void Clr (fType mask)
 
Typeoperator= (const Type &rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::AttributeVoid
 AttributeVoid (void)
 
 AttributeVoid (const AttributeVoid &rSrcAttr)
 
virtual ~AttributeVoid (void)
 
virtual void SetDefault (void)
 
Typeoperator= (const Type &rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 
 Type (const Type &rType)
 
virtual ~Type (void)
 
virtual TypeNew (void) const
 
virtual TypeCopy (void) const
 
virtual const TypeCast (const Type *pOther) const
 
virtual TypeAssign (const Type &rSrc)
 
Typeoperator= (const Type &rSrc)
 
virtual bool Equal (const Type &rOther) const
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
virtual void Name (const std::string &rName)
 
virtual const std::string & Name (void) const
 
virtual const std::string & TypeName (void) const
 
void Write (const Type *pContext=0) const
 
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
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 
void XWrite (const Type *pContext=0) const
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 
void DWrite (const Type *pContext=0) const
 
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
void SWrite (TokenWriter &rTw) const
 
void SWrite (void) const
 
std::string ToSText (void) const
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 

Static Public Member Functions

static SymbolTableStaticLabelSymbolTablep (void)
 
static Idx IndexOfLabelN (void)
 
static Idx IndexOfLabelA (void)
 
static Idx IndexOfLabelRelN (void)
 
static Idx IndexOfLabelSpecViolated (void)
 
static std::string Symbol (Idx index)
 
- Static Public Member Functions inherited from faudes::AttributeVoid
static void Skip (TokenReader &rTr)
 

Public Attributes

NameSet mDiagLabels
 
- Public Attributes inherited from faudes::AttributeFlags
fType mFlags
 

Protected Member Functions

void DoWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const
 
void DoXWrite (TokenWriter &rTw, const std::string &rLabel, const Type *pContext) const
 
void DoRead (TokenReader &rTr, const std::string &rLabel, const Type *pContext)
 
void DoAssign (const DiagLabelSet &rSrcAttr)
 
bool DoEqual (const DiagLabelSet &rOther) const
 
- Protected Member Functions inherited from faudes::AttributeFlags
void DoAssign (const AttributeFlags &rSrcAttr)
 
bool DoEqual (const AttributeFlags &rOther) const
 
- Protected Member Functions inherited from faudes::AttributeVoid
void DoAssign (const AttributeVoid &rSrcAttr)
 
bool DoEqual (const AttributeVoid &rOther) const
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 
bool DoEqual (const Type &rOther) const
 
virtual void DoSWrite (TokenWriter &rTw) const
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Static Private Attributes

static SymbolTable msLabelSymbolTable
 
static Idx msLabelN = DiagLabelSet::msLabelSymbolTable.InsEntry("N")
 
static Idx msLabelA = DiagLabelSet::msLabelSymbolTable.InsEntry("A")
 
static Idx msLabelRelN = DiagLabelSet::msLabelSymbolTable.InsEntry("relN")
 
static Idx msLabelSpecViolated = DiagLabelSet::msLabelSymbolTable.InsEntry("F")
 

Additional Inherited Members

- Static Public Attributes inherited from faudes::AttributeFlags
static const fType mDefFlags =0x0
 

Detailed Description

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.

Member Typedef Documentation

◆ Iterator

typedef NameSet::Iterator faudes::DiagLabelSet::Iterator

Convenience definition of NameSet::Iterator.

Definition at line 43 of file diag_attrlabelset.h.

Constructor & Destructor Documentation

◆ DiagLabelSet() [1/3]

faudes::DiagLabelSet::DiagLabelSet ( void  )

Constructor for DiagLabelSet with static LabelSymbolTable.

Definition at line 24 of file diag_attrlabelset.cpp.

◆ DiagLabelSet() [2/3]

faudes::DiagLabelSet::DiagLabelSet ( SymbolTable pSymTab)

Constructor for DiagLabelSet with specified SymbolTable.

Definition at line 35 of file diag_attrlabelset.cpp.

◆ DiagLabelSet() [3/3]

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.

Parameters
rFilenameFilename
rLabelToken label for the labels in the file; default value "DiagLabels"

Definition at line 60 of file diag_attrlabelset.h.

Member Function Documentation

◆ Clear()

void faudes::DiagLabelSet::Clear ( void  )
virtual

Clear mDiagLabels.

Reimplemented from faudes::AttributeVoid.

Definition at line 109 of file diag_attrlabelset.cpp.

◆ DoAssign()

void faudes::DiagLabelSet::DoAssign ( const DiagLabelSet rSrcAttr)
protected

Copy attribute members

Parameters
rSrcAttrSource to copy from

Definition at line 47 of file diag_attrlabelset.cpp.

◆ DoEqual()

bool faudes::DiagLabelSet::DoEqual ( const DiagLabelSet rOther) const
protected

Test equality

Parameters
rOtherAttribute to compare with

Definition at line 53 of file diag_attrlabelset.cpp.

◆ DoRead()

void faudes::DiagLabelSet::DoRead ( TokenReader rTr,
const std::string &  rLabel,
const Type pContext 
)
protectedvirtual

Read mDiagLabels from TokenReader.

Parameters
rTrReference to TokenReader
rLabelIs ignored. Label of the section is "DiagLabels".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 161 of file diag_attrlabelset.cpp.

◆ DoWrite()

void faudes::DiagLabelSet::DoWrite ( TokenWriter rTw,
const std::string &  rLabel,
const Type pContext 
) const
protectedvirtual

Write mDiagLabels to TokenWriter.

Parameters
rTwReference to TokenWriter
rLabelIs ignored. Label of the section is "DiagLabels".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 149 of file diag_attrlabelset.cpp.

◆ DoXWrite()

void faudes::DiagLabelSet::DoXWrite ( TokenWriter rTw,
const std::string &  rLabel,
const Type pContext 
) const
protectedvirtual

Write mDiagLabels to TokenWriter.

Parameters
rTwReference to TokenWriter
rLabelIs ignored. Label of the section is "DiagLabels".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 155 of file diag_attrlabelset.cpp.

◆ Empty()

bool faudes::DiagLabelSet::Empty ( void  ) const

Check if mDiagLabels is empty.

Returns
true if empty

Definition at line 79 of file diag_attrlabelset.cpp.

◆ Erase()

bool faudes::DiagLabelSet::Erase ( Idx  index)

Delete element by index. The symbolic name is not removed from the SymbolTable.

Parameters
indexIndex to delete.
Returns
True if element did exist.

Definition at line 104 of file diag_attrlabelset.cpp.

◆ Exists()

bool faudes::DiagLabelSet::Exists ( Idx  index) const

Test existence of index.

Parameters
indexIndex to test
Returns
True if index is in this set

Definition at line 89 of file diag_attrlabelset.cpp.

◆ IndexOfLabelA()

Idx faudes::DiagLabelSet::IndexOfLabelA ( void  )
static

Return index label "ambiguous".

Returns
Index of static msLabelA.

Definition at line 119 of file diag_attrlabelset.cpp.

◆ IndexOfLabelN()

Idx faudes::DiagLabelSet::IndexOfLabelN ( void  )
static

Return index label "normal".

Returns
Index of static msLabelN.

Definition at line 114 of file diag_attrlabelset.cpp.

◆ IndexOfLabelRelN()

Idx faudes::DiagLabelSet::IndexOfLabelRelN ( void  )
static

Return index label "relatively normal".

Returns
Index of static msLabelRelN.

Definition at line 124 of file diag_attrlabelset.cpp.

◆ IndexOfLabelSpecViolated()

Idx faudes::DiagLabelSet::IndexOfLabelSpecViolated ( void  )
static

Return index label "specification violated".

Returns
Index of static msLabelSpecViolated.

Definition at line 129 of file diag_attrlabelset.cpp.

◆ Insert()

bool faudes::DiagLabelSet::Insert ( Idx  index)

Add an element by index. Index must be already known to the global SymbolTable.

Parameters
indexIndex to add
Returns
True, if element was new to set

Definition at line 94 of file diag_attrlabelset.cpp.

◆ InsertSet()

void faudes::DiagLabelSet::InsertSet ( const DiagLabelSet rSet)

Insert elements of rSet

Parameters
rSetIndices of elements to add

Definition at line 99 of file diag_attrlabelset.cpp.

◆ IsDefault()

bool faudes::DiagLabelSet::IsDefault ( void  ) const
virtual

Test for default value

Returns
True for default value

Reimplemented from faudes::AttributeFlags.

Definition at line 64 of file diag_attrlabelset.cpp.

◆ LabelSymbolTablep()

void faudes::DiagLabelSet::LabelSymbolTablep ( SymbolTable pSymTab)

Reset pointer mpSymbolTable

Parameters
pSymTabPointer to new symbol table

Definition at line 74 of file diag_attrlabelset.cpp.

◆ operator*()

DiagLabelSet faudes::DiagLabelSet::operator* ( const DiagLabelSet rOtherSet) const

Set intersection operator.

Returns
Intersection DiagLabelSet

Definition at line 166 of file diag_attrlabelset.cpp.

◆ operator+()

DiagLabelSet faudes::DiagLabelSet::operator+ ( const DiagLabelSet rOtherSet) const

Set union operator.

Returns
Union DiagLabelSet

Definition at line 174 of file diag_attrlabelset.cpp.

◆ operator-()

DiagLabelSet faudes::DiagLabelSet::operator- ( const DiagLabelSet rOtherSet) const

Set difference operator.

Returns
Difference DiagLabelSet

Definition at line 182 of file diag_attrlabelset.cpp.

◆ operator<=()

bool faudes::DiagLabelSet::operator<= ( const DiagLabelSet rOtherSet) const

Test for subset.

Definition at line 191 of file diag_attrlabelset.cpp.

◆ operator>=()

bool faudes::DiagLabelSet::operator>= ( const DiagLabelSet rOtherSet) const

Test for superset.

Definition at line 196 of file diag_attrlabelset.cpp.

◆ Size()

Idx faudes::DiagLabelSet::Size ( void  ) const

Get size of mDiagLabels.

Returns
Number of indices in mDiagLabels.

Definition at line 84 of file diag_attrlabelset.cpp.

◆ StaticLabelSymbolTablep()

SymbolTable * faudes::DiagLabelSet::StaticLabelSymbolTablep ( void  )
static

Get pointer to static LabelSymbolTable

Returns
Pointer to static LabelSymbolTable

Definition at line 69 of file diag_attrlabelset.cpp.

◆ Str()

string faudes::DiagLabelSet::Str ( void  ) const

Prints mDiagLabels to a string.

Returns
String representation of mDiagLabels.

Definition at line 139 of file diag_attrlabelset.cpp.

◆ Symbol()

string faudes::DiagLabelSet::Symbol ( Idx  index)
static

Symbolic name lookup of element in SymbolTable.

Parameters
indexIndex to look up.
Returns
Symbolic name of index, or empty string "" for non-existent index.

Definition at line 134 of file diag_attrlabelset.cpp.

Member Data Documentation

◆ mDiagLabels

NameSet faudes::DiagLabelSet::mDiagLabels

Set of diagnoser label names.

Definition at line 38 of file diag_attrlabelset.h.

◆ msLabelA

Idx faudes::DiagLabelSet::msLabelA = DiagLabelSet::msLabelSymbolTable.InsEntry("A")
staticprivate

Static index of label "ambiguous".

Definition at line 30 of file diag_attrlabelset.h.

◆ msLabelN

Idx faudes::DiagLabelSet::msLabelN = DiagLabelSet::msLabelSymbolTable.InsEntry("N")
staticprivate

Static index of label "normal".

Definition at line 28 of file diag_attrlabelset.h.

◆ msLabelRelN

Idx faudes::DiagLabelSet::msLabelRelN = DiagLabelSet::msLabelSymbolTable.InsEntry("relN")
staticprivate

Static index of label "relatively normal" (only for diagnoser building purpose).

Definition at line 32 of file diag_attrlabelset.h.

◆ msLabelSpecViolated

Idx faudes::DiagLabelSet::msLabelSpecViolated = DiagLabelSet::msLabelSymbolTable.InsEntry("F")
staticprivate

Static index of label "specification violated".

Definition at line 34 of file diag_attrlabelset.h.

◆ msLabelSymbolTable

SymbolTable faudes::DiagLabelSet::msLabelSymbolTable
staticprivate

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.


The documentation for this class was generated from the following files:

libFAUDES 2.33c --- 2025.05.15 --- c++ api documentaion by doxygen