• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

util

KDevelop::ConvenientFreeListSet

KDevelop::ConvenientFreeListSet< Data, Handler > Class Template Reference

This is a simple set implementation based on the embedded free tree algorithms. More...

#include <convenientfreelist.h>

List of all members.

Public Types

typedef
ConvenientEmbeddedSetIterator
< Data, Handler > 
Iterator

Public Member Functions

 ConvenientFreeListSet (int centralFreeItem, QVector< Data > data)
int centralFreeItem () const
bool contains (const Data &item) const
const QVector< Data > & data () const
void insert (const Data &item)
Iterator iterator () const
void remove (const Data &item)

Detailed Description

template<class Data, class Handler>
class KDevelop::ConvenientFreeListSet< Data, Handler >

This is a simple set implementation based on the embedded free tree algorithms.

The core advantage of the whole thing is that the wole set is represented by a consecutive memory-area, and thus can be stored or copied using a simple memcpy. However in many cases it's better using the algorithms directly in such cases.

However even for normal tasks this implementation does have some advantages over std::set:

  • Many times faster iteration through contained data
  • Lower memory-usage if the objects are small, since there is no heap allocation overhead
  • Can be combined with other embedded-free-list based sets using algorithms in ConstantConvenientEmbeddedSet Disadvantages:
  • Significantly slower insertion

Definition at line 685 of file convenientfreelist.h.


Constructor & Destructor Documentation

template<class Data , class Handler >
KDevelop::ConvenientFreeListSet< Data, Handler >::ConvenientFreeListSet ( int  centralFreeItem,
QVector< Data >  data 
) [inline]

Re-construct a set from its components.

Definition at line 694 of file convenientfreelist.h.


Member Function Documentation

template<class Data , class Handler >
int KDevelop::ConvenientFreeListSet< Data, Handler >::centralFreeItem (  )  const [inline]

You can use this to store the set to disk and later give it together with data() to the constructor, thus reconstructing it.

Definition at line 698 of file convenientfreelist.h.


The documentation for this class was generated from the following file:
  • convenientfreelist.h

util

Skip menu "util"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal