#include <mymoneykeyvaluecontainer.h>


Public Member Functions | |
| MyMoneyKeyValueContainer () | |
| MyMoneyKeyValueContainer (const QDomElement &node) | |
| ~MyMoneyKeyValueContainer () | |
| const QString & | value (const QString &key) const |
| void | setValue (const QString &key, const QString &value) |
| void | deletePair (const QString &key) |
| void | clear (void) |
| const QMap< QString, QString > & | pairs (void) const |
| void | setPairs (const QMap< QString, QString > &list) |
| bool | operator== (const MyMoneyKeyValueContainer &) const |
| const QString & | operator[] (const QString &k) const |
| QString & | operator[] (const QString &k) |
| void | writeXML (QDomDocument &document, QDomElement &parent) const |
Private Attributes | |
| QMap< QString, QString > | m_kvp |
| MyMoneyKeyValueContainer::MyMoneyKeyValueContainer | ( | ) |
| MyMoneyKeyValueContainer::MyMoneyKeyValueContainer | ( | const QDomElement & | node | ) |
| MyMoneyKeyValueContainer::~MyMoneyKeyValueContainer | ( | ) |
| const QString& MyMoneyKeyValueContainer::value | ( | const QString & | key | ) | const |
This method can be used to retrieve the value for a specific key. If the key is unknown in this container, an empty string will be returned.
| key | const reference to QString with the key to search for |
Reimplemented in MyMoneySplit, MyMoneyDatabaseMgr, and MyMoneySeqAccessMgr.
| void MyMoneyKeyValueContainer::setValue | ( | const QString & | key, | |
| const QString & | value | |||
| ) |
This method is used to add a key/value pair to the container or modify an existing pair.
| key | const reference to QString with the key to search for | |
| value | const reference to QString with the value for this key |
Reimplemented in MyMoneySplit, MyMoneyDatabaseMgr, and MyMoneySeqAccessMgr.
| void MyMoneyKeyValueContainer::deletePair | ( | const QString & | key | ) |
This method is used to remove an existing key/value pair from the container. If the key does not exist, the container is not changed.
| key | const reference to QString with the key to remove |
Reimplemented in MyMoneyDatabaseMgr, and MyMoneySeqAccessMgr.
| void MyMoneyKeyValueContainer::clear | ( | void | ) |
This method clears all pairs currently in the container.
| const QMap<QString, QString>& MyMoneyKeyValueContainer::pairs | ( | void | ) | const [inline] |
This method is used to retrieve the whole set of key/value pairs from the container. It is meant to be used for permanent storage functionality.
Reimplemented in MyMoneyDatabaseMgr, and MyMoneySeqAccessMgr.
| void MyMoneyKeyValueContainer::setPairs | ( | const QMap< QString, QString > & | list | ) |
This method is used to initially store a set of key/value pairs in the container. It is meant to be used for loading functionality from permanent storage.
| list | const QMap<QString, QString> containing the set of key/value pairs to be loaded into the container. |
Reimplemented in MyMoneyDatabaseMgr, and MyMoneySeqAccessMgr.
| bool MyMoneyKeyValueContainer::operator== | ( | const MyMoneyKeyValueContainer & | ) | const |
This operator tests for equality of two MyMoneyKeyValueContainer objects
| const QString& MyMoneyKeyValueContainer::operator[] | ( | const QString & | k | ) | const [inline] |
| QString& MyMoneyKeyValueContainer::operator[] | ( | const QString & | k | ) | [inline] |
| void MyMoneyKeyValueContainer::writeXML | ( | QDomDocument & | document, | |
| QDomElement & | parent | |||
| ) | const |
This method creates a QDomElement for the document under the parent node parent.
| document | reference to QDomDocument | |
| parent | reference to QDomElement parent node |
Reimplemented in MyMoneyAccount, MyMoneyInstitution, MyMoneySecurity, MyMoneySplit, and MyMoneyTransaction.
QMap<QString, QString> MyMoneyKeyValueContainer::m_kvp [private] |
This member variable represents the container of key/value pairs.
1.5.6