#include <mymoneyobject.h>


Public Member Functions | |
| MyMoneyObject () | |
| virtual | ~MyMoneyObject () |
| const QString & | id (void) const |
| void | clearId (void) |
| virtual bool | hasReferenceTo (const QString &id) const =0 |
| virtual void | writeXML (QDomDocument &document, QDomElement &parent) const =0 |
| bool | operator== (const MyMoneyObject &right) const |
Static Public Member Functions | |
| static const QString & | emptyId (void) |
Protected Member Functions | |
| MyMoneyObject (const QString &id) | |
| MyMoneyObject (const QDomElement &node, const bool forceId=true) | |
| void | setId (const QString &id) |
| void | writeBaseXML (QDomDocument &document, QDomElement &el) const |
Protected Attributes | |
| QString | m_id |
Static Protected Attributes | |
| static const QString | m_emptyId |
| MyMoneyObject::MyMoneyObject | ( | ) |
This is the constructor for the MyMoneyObject object
| virtual MyMoneyObject::~MyMoneyObject | ( | ) | [virtual] |
This is the destructor for the MyMoneyObject object
| MyMoneyObject::MyMoneyObject | ( | const QString & | id | ) | [protected] |
| MyMoneyObject::MyMoneyObject | ( | const QDomElement & | node, | |
| const bool | forceId = true | |||
| ) | [protected] |
This contructor reads the id from the id attribute of the QDomElement.
| node | const reference to the QDomElement from which to obtain the id of the object | |
| forceId | flag to be able to suppress enforcement of an id defaults to true which requires the node to have an attribute with name id. If it does not contain such an attribute, an exception will be thrown. If forceId is false, no check for an id is performed. This will be used by objects, which are stored w/o id (eg. splits, transactions within schedules) |
| const QString& MyMoneyObject::id | ( | void | ) | const [inline] |
This method retrieves the id of the object
Reimplemented in MyMoneyBudget, and MyMoneyPayee.
| void MyMoneyObject::clearId | ( | void | ) |
This method clears the id of the object
| virtual bool MyMoneyObject::hasReferenceTo | ( | const QString & | id | ) | const [pure virtual] |
This method must be provided by all derived objects. It returns, a true if the object is referencing the one requested by the parameter id. If it does not, this method returns false.
| id | id of the object to be checked for references |
| true | This object references object with id id. | |
| false | This object does not reference the object with id id. |
Implemented in MyMoneyAccount, MyMoneyAccountLoan, MyMoneyBudget, MyMoneyInstitution, MyMoneyPayee, MyMoneyReport, MyMoneySchedule, MyMoneySecurity, MyMoneySplit, and MyMoneyTransaction.
| virtual void MyMoneyObject::writeXML | ( | QDomDocument & | document, | |
| QDomElement & | parent | |||
| ) | const [pure virtual] |
This method creates a QDomElement for the document under the parent node parent.
| document | reference to QDomDocument | |
| parent | reference to QDomElement parent node |
Implemented in MyMoneyAccount, MyMoneyBudget, MyMoneyInstitution, MyMoneyPayee, MyMoneyReport, MyMoneySchedule, MyMoneySecurity, MyMoneySplit, and MyMoneyTransaction.
| bool MyMoneyObject::operator== | ( | const MyMoneyObject & | right | ) | const |
| static const QString& MyMoneyObject::emptyId | ( | void | ) | [static] |
| void MyMoneyObject::setId | ( | const QString & | id | ) | [protected] |
| void MyMoneyObject::writeBaseXML | ( | QDomDocument & | document, | |
| QDomElement & | el | |||
| ) | const [protected] |
This method writes out the members contained in this object.
QString MyMoneyObject::m_id [protected] |
Reimplemented in MyMoneySplit, and test::TransactionHelper.
const QString MyMoneyObject::m_emptyId [static, protected] |
1.5.6