mymoneyobject.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           mymoneyobject.h
00003                              -------------------
00004     copyright            : (C) 2005 by Thomas Baumgart
00005     email                : ipwizard@users.sourceforge.net
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
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 // QT Includes
00026 
00027 #include <qstring.h>
00028 #include <qdom.h>
00029 #include <qdatetime.h>
00030 
00031 // ----------------------------------------------------------------------------
00032 // Project Includes
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) /* __attribute__ ((deprecated)) */;
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 

Generated on Wed Jan 26 13:03:18 2011 for KMyMoney by  doxygen 1.5.6