answer.h

00001 /***************************************************************************
00002                           answer.h  -  description
00003                              -------------------
00004     begin                : mar avr 11 2006
00005     copyright            : (C) 2006 by Sylvain Archenault <sylvain.archenault@laposte.net>
00006                                        Yves Houpert <yves.houpert@insa-rouen.fr>
00007     
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
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: //public members
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: // private members
00113   int m_iID;
00117   bool m_bValue;
00121   std::string m_sDescription;
00122 
00123 public: //public members
00125    static const char* ID_ATTR;
00126 };
00127 
00128 #endif

Generated on Fri May 19 12:15:54 2006 for Bamboo Ch@t by  doxygen 1.4.6