language/duchain
KDevelop::TemporaryDataManager< T, threadSafe > Class Template Reference
Manages a repository of items for temporary usage. More...
#include <appendedlist.h>
Public Member Functions | |
| TemporaryDataManager (QString id=QString()) | |
| uint | alloc () |
| void | free (uint index) |
| T & | getItem (uint index) |
| uint | usedItemCount () const |
Detailed Description
template<class T, bool threadSafe = true>
class KDevelop::TemporaryDataManager< T, threadSafe >
Manages a repository of items for temporary usage.
The items will be allocated with an index on alloc(), and freed on free(index). When freed, the same index will be re-used for a later allocation, thus no real allocations will be happening in most cases. The returned indices will always be ored with DynamicAppendedListMask.
Definition at line 67 of file appendedlist.h.
Member Function Documentation
template<class T, bool threadSafe = true>
| uint KDevelop::TemporaryDataManager< T, threadSafe >::alloc | ( | ) | [inline] |
Allocates an item index, which from now on you can get using getItem, until you call free(.
.) on the index. The returned item is not initialized and may contain random older content, so you should clear it after getting it for the first time
Definition at line 93 of file appendedlist.h.
The documentation for this class was generated from the following file:
KDE 4.4 API Reference