17 mFailureEvents.
Name(
"FailureEvents");
18 mFailureEvents.TypeName(
"FailureEvents");
19 mFailureEvents.XElementTag(
"Event");
20 mIndicatorEvents.Name(
"IndicatorEvents");
21 mIndicatorEvents.TypeName(
"IndicatorEvents");
22 mIndicatorEvents.XElementTag(
"Event");
28 AttributeFlags::DoAssign(rSrcAttr);
37 if(!AttributeFlags::DoEqual(rAttr))
return false;
46 bool AttributeFailureEvents::IsDefault(
void)
const{
47 return (mFailureEvents.Empty() && mIndicatorEvents.Empty());
51 void AttributeFailureEvents::Clear(
void) {
52 mFailureEvents.
Clear();
53 mIndicatorEvents.Clear();
57 void AttributeFailureEvents::DoWrite(
TokenWriter& rTw,
const std::string& rLabel,
const Type* pContext)
const {
58 if(IsDefault())
return;
59 AttributeFlags::DoWrite(rTw,
"",pContext);
60 if(!mFailureEvents.Empty())
61 mFailureEvents.Write(rTw,
"FailureEvents", pContext);
62 if(!mIndicatorEvents.Empty())
63 mIndicatorEvents.Write(rTw,
"IndicatorEvents", pContext);
67 void AttributeFailureEvents::DoXWrite(
TokenWriter& rTw,
const std::string& rLabel,
const Type* pContext)
const {
68 if(IsDefault())
return;
69 AttributeFlags::DoXWrite(rTw,
"",pContext);
70 if(!mFailureEvents.Empty())
71 mFailureEvents.XWrite(rTw,
"FailureEvents", pContext);
72 if(!mIndicatorEvents.Empty())
73 mIndicatorEvents.XWrite(rTw,
"IndicatorEvents", pContext);
79 void AttributeFailureEvents::DoRead(
TokenReader &rTr,
const std::string &rLabel,
const Type *pContext) {
80 AttributeFlags::DoRead(rTr,
"",pContext);
84 if(token.
Type()!=Token::Begin)
break;
86 mFailureEvents.Read(rTr,
"FailureEvents", pContext);
90 mIndicatorEvents.Read(rTr,
"IndicatorEvents", pContext);
#define FAUDES_TYPE_IMPLEMENTATION(ftype, ctype, cbase)
faudes type implementation macros, overall
Stores the failure and indicator events for a particular failure type.
EventSet mIndicatorEvents
Set of indicator events.
EventSet mFailureEvents
Set of failure events.
A TokenReader reads sequential tokens from a file or string.
bool Peek(Token &token)
Peek next token.
A TokenWriter writes sequential tokens to a file, a string or stdout.
Tokens model atomic data for stream IO.
const std::string & StringValue(void) const
Get string value of a name token.
TokenType Type(void) const
Get token Type.
Base class of all libFAUDES objects that participate in the run-time interface.
virtual void Name(const std::string &rName)
Set the objects's name.
Failure and indicator events for a common failure type.
virtual void Clear(void)
Clear all set.
libFAUDES resides within the namespace faudes.