![]() |
Home · Modules · Classes · Namespaces · Functions |
The QxtBdbTree class is a template berkeley container for tree structured data More...
#include <QxtBdbTree>
The QxtBdbTree class is a template berkeley container for tree structured data
The template argument must be registered with the Qt meta system. You may not touch the file while a QxtBdbTree instance is running on it.
Example usage:
QxtBdbTree<QString> db("test.db");
db.root().append("fooooo").append("bla");
db.dumpTree(); //try this if you are unsure, how the data will look like
There is an extensive example in /examples/berkeley/xmlstorage
All functions of this class are thread safe. Calling open() multiple times is undefined. An iterator may only be used from one thread at once, but you can have multiple iterators.
TODO: {implicitshared}
See also QxtBdbTreeIterator.
Constructs an invalid QxtBdbTree
Constructs a QxtBdbTree, and opens the file specified as its database.
Erase all records. This does not delete the underlying file.
Outputs the contents of the database as flat file, and as iterateable tree onto qDebug(). This function assumes, the class used for template initialisation implements the QDebug<< operator
Flushes the underlying DB file. All changes are synced to disk.
Opens the specified file.
Returns true on success and false on failure. Note: a sanity check is performed before opening the file.
Returns the rootnode, which is, similar to QAbstractItemModel, invalid and has no data itself.
Copyright © 2007-2011 Qxt Foundation |
Qxt 0.6.2 |