error.h

00001 /***************************************************************************
00002                           error.h  -  description
00003                              -------------------
00004     begin                : mar avr 25 2006
00005     copyright            : (C) 2006 by 
00006                  - Sylvain Archenault <sylvain.archenault@laposte.net> 
00007                  - Yves Houpert <yves.houpert@insa-rouen.fr>
00008  
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 #ifndef ERROR_H
00020 #define ERROR_H
00021 
00022 #include <Message/basemessage.h>
00023 
00036 class Error : public BaseMessage
00037 {
00038 public:
00041   Error(const int iErrorID = -1);
00042 
00046   Error(const int iErrorID, const std::string& sDescription);
00047 
00049   ~Error();
00050 
00053   void setErrorID(const int iErrorID) { m_iErrorID = iErrorID; }
00054 
00057   int getErrorId() const { return m_iErrorID; }
00058 
00061   void setDescription(const std::string& sDescription) { m_sDescription = sDescription ;}
00062 
00065   std::string getDescription() const { return m_sDescription;}
00066 
00070   virtual void toXML(XMLWriter& writer) const;
00071 
00073   virtual void processMessage() const;
00074 
00079   virtual std::string toString() const;
00080 
00083   virtual Error& copy() const;
00084 
00088   virtual void toXMLExt(XMLWriter& writer) const;
00089 
00090 private: //private members
00092   std::string m_sDescription;
00094   int m_iErrorID;
00095 
00096 public: //public members
00098   static const char* ROOT_NODE;
00100   static const char* ID_ATTR;
00102   static const char* DESCRIPTION_NODE;
00104   static const int SAXERROR = 1;
00106   static const int CRYPTEDERROR = 2;
00107 };
00108 
00109 #endif

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