Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::EFreeListIndexPool< E, next, index > Class Template Reference

More complex implementation of a FreeList, which is able to generate indeices for the elements. More...

#include <ogdf/basic/EFreeList.h>

List of all members.

Public Member Functions

 EFreeListIndexPool ()
 Creates a new IndexPool and a FreeList.
E * alloc ()
 Allocates a new Element by either using the free list or allocating a new one with a brand new index.
void free (E *ptr)
 Frees an element using the FreeList.
int numUsedIndices () const
 The value indicates that all indices in 0..numUsedIndices-1 might be in use.

Protected Attributes

EFreeList< E, next > m_freeList
 The free list for allocating the memory.
int m_nextFreeIndex
 The next brand new index.

Detailed Description

template<typename E, E *E::* next, int E::* index>
class ogdf::EFreeListIndexPool< E, next, index >

More complex implementation of a FreeList, which is able to generate indeices for the elements.

Definition at line 114 of file EFreeList.h.


Constructor & Destructor Documentation

template<typename E, E *E::* next, int E::* index>
ogdf::EFreeListIndexPool< E, next, index >::EFreeListIndexPool ( )
inline

Creates a new IndexPool and a FreeList.

Definition at line 118 of file EFreeList.h.


Member Function Documentation

template<typename E, E *E::* next, int E::* index>
E* ogdf::EFreeListIndexPool< E, next, index >::alloc ( )
inline

Allocates a new Element by either using the free list or allocating a new one with a brand new index.

Definition at line 127 of file EFreeList.h.

template<typename E, E *E::* next, int E::* index>
void ogdf::EFreeListIndexPool< E, next, index >::free ( E *  ptr)
inline

Frees an element using the FreeList.

Definition at line 121 of file EFreeList.h.

template<typename E, E *E::* next, int E::* index>
int ogdf::EFreeListIndexPool< E, next, index >::numUsedIndices ( ) const
inline

The value indicates that all indices in 0..numUsedIndices-1 might be in use.

Definition at line 124 of file EFreeList.h.


Member Data Documentation

template<typename E, E *E::* next, int E::* index>
EFreeList<E, next> ogdf::EFreeListIndexPool< E, next, index >::m_freeList
protected

The free list for allocating the memory.

Definition at line 145 of file EFreeList.h.

template<typename E, E *E::* next, int E::* index>
int ogdf::EFreeListIndexPool< E, next, index >::m_nextFreeIndex
protected

The next brand new index.

Definition at line 142 of file EFreeList.h.


The documentation for this class was generated from the following file: