Detailed Description

Partitions the failure and indicator events.

This attribute is a wrapper to a nameset with failuretype attributes.

Note: formally derived from AttributeFlags for strategic reasons only

Definition at line 25 of file diag_attrfailuretypes.h.

#include <diag_attrfailuretypes.h>

Public Member Functions

 AttributeFailureTypeMap (void)
 Default constructor. More...
 
 AttributeFailureTypeMap (const std::string &rFilename)
 Constructor from file. More...
 
 AttributeFailureTypeMap (const AttributeFailureTypeMap &rOtherAttr)
 Copyconstructor. More...
 
 ~AttributeFailureTypeMap (void)
 Destructor. More...
 
bool IsDefault (void) const
 Test for default value. More...
 
bool Empty (void) const
 Test if mFailureTypeMap is empty. More...
 
void Clear (void)
 Clears mFailureTypeMap. More...
 
Idx AddFailureTypeMapping (const std::string &failureType, const EventSet &rfailureEvents)
 Add a set of failure events to failure type map. More...
 
void AddFailureTypeMap (const std::map< std::string, EventSet > &rFailureMap)
 Inserts entire failure type map to mFailureTypeMap. More...
 
Idx FailureType (Idx failureEvent) const
 Returns failure type of failure event. More...
 
EventSet AllFailureEvents (void) const
 Obtain all failure events in mFailureTypeMap. More...
 
- Public Member Functions inherited from faudes::AttributeFlags
 AttributeFlags (void)
 Default constructor. More...
 
 AttributeFlags (const AttributeFlags &rOther)
 Copy constructor. More...
 
virtual ~AttributeFlags (void)
 Destructor. More...
 
bool Test (fType mask) const
 Test a flag. More...
 
bool TestAll (fType mask) const
 Test multible flags, combine by "and". More...
 
bool TestSome (fType mask) const
 Test multible flags, combine by "or". More...
 
bool TestNone (fType mask) const
 Test multible flags, combine by "not or". More...
 
void Set (fType mask)
 Set multiple flags. More...
 
void Clr (fType mask)
 Clear multiple flags. More...
 
- Public Member Functions inherited from faudes::AttributeVoid
 AttributeVoid (void)
 Constructor. More...
 
 AttributeVoid (const AttributeVoid &rSrcAttr)
 Copy Constructor. More...
 
virtual ~AttributeVoid (void)
 Destructor. More...
 
virtual void SetDefault (void)
 Set to default value. More...
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 Constructor. More...
 
 Type (const Type &rType)
 Copy constructor. More...
 
virtual ~Type (void)
 Destructor. More...
 
virtual TypeNew (void) const
 Construct on heap. More...
 
virtual TypeCopy (void) const
 Construct on heap. More...
 
virtual const TypeCast (const Type *pOther) const
 Cast other object to this type. More...
 
virtual TypeAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void Name (const std::string &rName)
 Set the objects's name. More...
 
virtual const std::string & Name (void) const
 Get objects's name. More...
 
virtual const std::string & TypeName (void) const
 Get objects's type name. More...
 
void Write (const Type *pContext=0) const
 Write configuration data to console. More...
 
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
 Write configuration data to a file. More...
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file. More...
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter. More...
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to an XML file. More...
 
void XWrite (const Type *pContext=0) const
 Write configuration data in XML format to concole Note: this write function uses the virtual function DoXWrite(), to be reimplemented by derived classes. More...
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in XML format to TokenWriter. More...
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string. More...
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string. More...
 
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format. More...
 
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
 Write configuration data to a file, debugging format. More...
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter. More...
 
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter. More...
 
void SWrite (void) const
 Write statistics comment to console. More...
 
std::string ToSText (void) const
 Write statistics to a string. More...
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified. More...
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from a string. More...
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified. More...
 

Public Attributes

TaNameSet< AttributeFailureEventsmFailureTypeMap
 Failure and indicator event partition. More...
 
- Public Attributes inherited from faudes::AttributeFlags
fType mFlags
 Flags (public access for convenience)
More...
 

Protected Member Functions

void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write mFailureTypeMap to TokenWriter. More...
 
void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write mFailureTypeMap to TokenWriter. More...
 
void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read mFailureTypeMap from TokenReader. More...
 
void DoAssign (const AttributeFailureTypeMap &rSrcAttr)
 Copy attribute members. More...
 
bool DoEqual (const AttributeFailureTypeMap &rAttr) const
 Test equality. More...
 
- Protected Member Functions inherited from faudes::AttributeFlags
void DoAssign (const AttributeFlags &rSrcAttr)
 Assignment method. More...
 
bool DoEqual (const AttributeFlags &rOther) const
 Test equality of configuration data. More...
 
- Protected Member Functions inherited from faudes::AttributeVoid
void DoAssign (const AttributeVoid &rSrcAttr)
 Assign attribute members. More...
 
bool DoEqual (const AttributeVoid &rOther) const
 Test equality of configuration data. More...
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Actual write method to write the attribute to a TokenWriter. More...
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
bool DoEqual (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void DoSWrite (TokenWriter &rTw) const
 Write statistical data as a comment to TokenWriter. More...
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 Get objects's type definition. More...
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Additional Inherited Members

- Static Public Member Functions inherited from faudes::AttributeVoid
static void Skip (TokenReader &rTr)
 Skip attribute tokens. More...
 
- Static Public Attributes inherited from faudes::AttributeFlags
static const fType mDefFlags =0x0
 

Constructor & Destructor Documentation

◆ AttributeFailureTypeMap() [1/3]

faudes::AttributeFailureTypeMap::AttributeFailureTypeMap ( void  )

Default constructor.

Definition at line 15 of file diag_attrfailuretypes.cpp.

◆ AttributeFailureTypeMap() [2/3]

faudes::AttributeFailureTypeMap::AttributeFailureTypeMap ( const std::string &  rFilename)

Constructor from file.

Definition at line 26 of file diag_attrfailuretypes.cpp.

◆ AttributeFailureTypeMap() [3/3]

faudes::AttributeFailureTypeMap::AttributeFailureTypeMap ( const AttributeFailureTypeMap rOtherAttr)

Copyconstructor.

Definition at line 39 of file diag_attrfailuretypes.cpp.

◆ ~AttributeFailureTypeMap()

faudes::AttributeFailureTypeMap::~AttributeFailureTypeMap ( void  )
inline

Destructor.

Definition at line 48 of file diag_attrfailuretypes.h.

Member Function Documentation

◆ AddFailureTypeMap()

void faudes::AttributeFailureTypeMap::AddFailureTypeMap ( const std::map< std::string, EventSet > &  rFailureMap)

Inserts entire failure type map to mFailureTypeMap.

Parameters
rFailureMapMapping of failure type names to failure events

Definition at line 110 of file diag_attrfailuretypes.cpp.

◆ AddFailureTypeMapping()

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!

Parameters
failureTypeName of failure type
rfailureEventsAssociated failure events
Returns
Index of entry for failure type name in LabelSymbolTable.
Exceptions
Exception
  • Adding failure to LabelSymbolTable failed (id 300).

Definition at line 85 of file diag_attrfailuretypes.cpp.

◆ AllFailureEvents()

EventSet faudes::AttributeFailureTypeMap::AllFailureEvents ( void  ) const

Obtain all failure events in mFailureTypeMap.

Returns
EventSet containing all failure events.

Definition at line 132 of file diag_attrfailuretypes.cpp.

◆ Clear()

void faudes::AttributeFailureTypeMap::Clear ( void  )
virtual

Clears mFailureTypeMap.

Reimplemented from faudes::AttributeVoid.

Definition at line 80 of file diag_attrfailuretypes.cpp.

◆ DoAssign()

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

Copy attribute members.

Parameters
rSrcAttrSource to copy from

Definition at line 53 of file diag_attrfailuretypes.cpp.

◆ DoEqual()

bool faudes::AttributeFailureTypeMap::DoEqual ( const AttributeFailureTypeMap rAttr) const
protected

Test equality.

Parameters
rAttrOther attribute to compare with

Definition at line 59 of file diag_attrfailuretypes.cpp.

◆ DoRead()

void faudes::AttributeFailureTypeMap::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
)
protectedvirtual

Read mFailureTypeMap from TokenReader.

Parameters
rTrReference to TokenReader
rLabelIs ignored. Failure events are read from section "FailureEvents" and indicator events from section "IndicatorEvents".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 158 of file diag_attrfailuretypes.cpp.

◆ DoWrite()

void faudes::AttributeFailureTypeMap::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Write mFailureTypeMap to TokenWriter.

Parameters
rTwReference to TokenWriter
rLabelIs ignored. Failure events are written in a section "FailureEvents" and indicator events in a separate section "IndicatorEvents".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 146 of file diag_attrfailuretypes.cpp.

◆ DoXWrite()

void faudes::AttributeFailureTypeMap::DoXWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Write mFailureTypeMap to TokenWriter.

Parameters
rTwReference to TokenWriter
rLabelIs ignored. Failure events are written in a section "FailureEvents" and indicator events in a separate section "IndicatorEvents".
pContextWrite context to provide contextual information

Reimplemented from faudes::AttributeFlags.

Definition at line 152 of file diag_attrfailuretypes.cpp.

◆ Empty()

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

Test if mFailureTypeMap is empty.

Returns
True if empty

Definition at line 75 of file diag_attrfailuretypes.cpp.

◆ FailureType()

Idx faudes::AttributeFailureTypeMap::FailureType ( Idx  failureEvent) const

Returns failure type of failure event.

Parameters
failureEventIndex of failure event.
Returns
Index of failure type.

Definition at line 120 of file diag_attrfailuretypes.cpp.

◆ IsDefault()

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

Test for default value.

Returns
True for default value

Reimplemented from faudes::AttributeFlags.

Definition at line 70 of file diag_attrfailuretypes.cpp.

Member Data Documentation

◆ mFailureTypeMap

TaNameSet<AttributeFailureEvents> faudes::AttributeFailureTypeMap::mFailureTypeMap

Failure and indicator event partition.

Mapping of failure type indices (as defined in GlobalEventSymbolTable) to associated failure events and indicator events.

Definition at line 36 of file diag_attrfailuretypes.h.


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

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen