fast Container for tree structured data More...
#include <QxtLinkedTree>
this template class can be used to store data easily in a tree structure.
Internally it uses the doublelinked list scheme, but adds client/parent links.
There are no random access functions, you have to use QxtLinkedTree::iterator to access the data.
This is very fast and efficient.
In order to be able to store an iterator into other data structures (eg. for QAbstractItemModel or QAbstractXmlNodeModel) functions are provided to create and store a linked item from and into a void pointer.
This class is implicit shared.
the destructor deletes all items, when they are no longer referenced by any other instance.
deletes all nodes recursively. this might take forever depending on the size of your tree.
returns an iterator on the root node
returns an iterator pre positioned on the item specified with toVoid.
passing anything that has not beeing created by toVoid() will crash.
also note that passing invalidated nodes will crash too.
Be extremly carefull. It is easy to currupt your data with this!
get an unique void pointer to be able to stuff an iterator into other structures.
You must not do anything else but pass this to fromVoid(). the pointer is invalid when the actual data has been removed and passing it to fromVoid will crash. You have been warned.
| Copyright © 2007 Qxt Foundation | Trademarks | Qt Extension Library 0.4 |