mymoneyobject.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef MYMONEYOBJECT_H
00018 #define MYMONEYOBJECT_H
00019
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023
00024
00025
00026
00027 #include <qstring.h>
00028 #include <qdom.h>
00029 #include <qdatetime.h>
00030
00031
00032
00033
00034 #include <kmymoney/export.h>
00035
00043 class KMYMONEY_EXPORT MyMoneyObject
00044 {
00045 public:
00049 MyMoneyObject();
00050
00054 virtual ~MyMoneyObject();
00055
00061 const QString& id(void) const { return m_id; };
00062
00066 void clearId(void);
00067
00077 virtual bool hasReferenceTo(const QString& id) const = 0;
00078
00086 virtual void writeXML(QDomDocument& document, QDomElement& parent) const = 0;
00087
00088 bool operator == (const MyMoneyObject& right) const;
00089
00090 static const QString& emptyId(void);
00091
00092 protected:
00098 MyMoneyObject(const QString& id);
00099
00114 MyMoneyObject(const QDomElement& node, const bool forceId = true);
00115
00116 void setId(const QString& id) ;
00117
00121 void writeBaseXML(QDomDocument& document, QDomElement& el) const;
00122
00123 protected:
00124 QString m_id;
00125 static const QString m_emptyId;
00126 };
00127
00128 #endif
00129