diag_attrfailureevents.hGo to the documentation of this file.00001 /** @file diag_attrfailureevents.h Failure and indicator events for a common failure type. */ 00002 00003 #ifndef DIAG_ATTRFAILUREEVENTS_H 00004 #define DIAG_ATTRFAILUREEVENTS_H 00005 00006 #include <vector> 00007 #include <map> 00008 #include <set> 00009 #include "corefaudes.h" 00010 #include "diag_attrlabelset.h" 00011 #include "diag_debug.h" 00012 00013 namespace faudes { 00014 00015 /** 00016 * Stores the failure and indicator events for a particular failure type. 00017 * 00018 * Note: this is formaly derived from AttributeFlags since some 00019 * some applications assume AttributeFlag the minimum attribute class. 00020 * 00021 * @ingroup DiagnosisPlugIn 00022 */ 00023 class AttributeFailureEvents : public AttributeFlags { 00024 00025 FAUDES_TYPE_DECLARATION(Void,AttributeFailureEvents,AttributeFlags) 00026 00027 public: 00028 /** Set of failure events. */ 00029 EventSet mFailureEvents; 00030 /** Set of indicator events. */ 00031 EventSet mIndicatorEvents; 00032 00033 public: 00034 00035 /** Default constructor. */ 00036 AttributeFailureEvents(void); 00037 00038 /** Default destructor. */ 00039 ~AttributeFailureEvents(void) {}; 00040 00041 /** 00042 * Test for default values of failure and indicator events. 00043 * 00044 * @return 00045 * True for default value. 00046 */ 00047 bool IsDefault(void) const; 00048 00049 /** 00050 * Clears failure and indicator events. 00051 */ 00052 virtual void Clear(void); 00053 00054 protected: 00055 00056 /** 00057 * Copy attribute members 00058 * 00059 * @param rSrcAttr 00060 * Source to copy from 00061 */ 00062 virtual void DoAssign(const AttributeFailureEvents& rSrcAttr); 00063 00064 /** 00065 * Test equality 00066 * 00067 * @param rAttr 00068 * Source to copy from 00069 */ 00070 virtual bool DoEuqal(const AttributeFailureEvents& rAttr) const; 00071 00072 /** 00073 * Write failure and indicator events. 00074 * 00075 * @param rTw 00076 * Reference to TokenWriter 00077 * @param rLabel 00078 * Section to write. 00079 * @param pContext 00080 * Write context to provide contextual information 00081 */ 00082 void DoWrite(TokenWriter& rTw, const std::string& rLabel, const Type* pContext) const; 00083 00084 /** 00085 * Write failure and indicator events. 00086 * 00087 * @param rTw 00088 * Reference to TokenWriter 00089 * @param rLabel 00090 * Section to write. 00091 * @param pContext 00092 * Write context to provide contextual information 00093 */ 00094 void DoXWrite(TokenWriter& rTw, const std::string& rLabel, const Type* pContext) const; 00095 00096 /** 00097 * Read failure and indicator events. 00098 * 00099 * @param rTr 00100 * Reference to TokenReader 00101 * @param rLabel 00102 * Section to read from. 00103 * @param pContext 00104 * Read context to provide contextual information 00105 */ 00106 void DoRead(TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0); 00107 00108 }; // class AttributeFailureEvents 00109 00110 00111 } // namespace faudes 00112 00113 #endif libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |