libFAUDES

Sections

Index

diag_attrfailureevents.h

Go 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  *  @ingroup DiagnosisPlugIn
00018  */
00019 class AttributeFailureEvents : public AttributeFlags {
00020 
00021 FAUDES_TYPE_DECLARATION(AttributeFailureEvents,AttributeFlags)
00022 
00023  public:
00024   /** Set of failure events. */
00025   EventSet mFailureEvents;
00026   /** Set of indicator events. */
00027   EventSet mIndicatorEvents;
00028 
00029  public:
00030 
00031   /** Default constructor. */
00032   AttributeFailureEvents(void) {};
00033   /** Default destructor. */
00034   ~AttributeFailureEvents(void) {};
00035 
00036   /**
00037    *  Test for default values of failure and indicator events.
00038    *
00039    *  @return
00040    *    True for default value.
00041    */
00042   bool IsDefault(void) const;
00043   
00044   /**
00045    * Clears failure and indicator events.
00046    */
00047   virtual void Clear(void);
00048 
00049  protected:
00050 
00051   /**
00052    *  Copy attribute members
00053    *
00054    *  @param rSrcAttr 
00055    *    Source to copy from
00056    */
00057    virtual AttributeFailureEvents& DoAssign(const AttributeFailureEvents& rSrcAttr); 
00058 
00059   /**
00060    *  Test equality
00061    *
00062    *  @param rAttr 
00063    *    Source to copy from
00064    */
00065    virtual bool DoEuqal(const AttributeFailureEvents& rAttr) const; 
00066 
00067   /**
00068    *  Write failure and indicator events.
00069    *
00070    *  @param rTw
00071    *    Reference to TokenWriter
00072    *  @param rLabel
00073    *    Section to write.
00074    *  @param pContext
00075    *    Write context to provide contextual information
00076    */  
00077   void DoWrite(TokenWriter& rTw, const std::string& rLabel, const Type* pContext) const;
00078   
00079   /**
00080    *  Read failure and indicator events.
00081    *
00082    *  @param rTr
00083    *    Reference to TokenReader
00084    *  @param rLabel
00085    *    Section to read from.
00086    *  @param pContext
00087    *    Read context to provide contextual information
00088    */  
00089   void DoRead(TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0);
00090   
00091 }; // class AttributeFailureEvents
00092 
00093 
00094 } // namespace faudes
00095 
00096 #endif

libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6