00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef ANSWER_H
00019 #define ANSWER_H
00020
00021 #include <Message/basemessage.h>
00022 #include <string>
00023
00030 class Answer : public BaseMessage
00031 {
00032 public:
00038 Answer(const int iID = 0, const bool bValue = false);
00039
00046 Answer(const int iID, const bool bValue, const std::string& sDescription);
00047
00051 ~Answer();
00052
00057 void setID(const int iID) { m_iID = iID; }
00058
00063 const int getAnswerID() const { return m_iID; }
00064
00069 const bool getValue() const { return m_bValue; }
00070
00075 void setValue(const bool bValue) { m_bValue = bValue; }
00076
00081 std::string getDescription() const { return m_sDescription; }
00082
00087 void setDescription(const std::string& sDescription)
00088 { m_sDescription = sDescription ;}
00089
00093 virtual void processMessage() const = 0;
00094
00101 void toXML(XMLWriter&) const;
00102
00107 virtual std::string toString() const;
00108
00109 private:
00113 int m_iID;
00117 bool m_bValue;
00121 std::string m_sDescription;
00122
00123 public:
00125 static const char* ID_ATTR;
00126 };
00127
00128 #endif