00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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:
00092 std::string m_sDescription;
00094 int m_iErrorID;
00095
00096 public:
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