More complex implementation of a FreeList, which is able to generate indeices for the elements. More...
#include <ogdf/basic/EFreeList.h>
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. | |
More complex implementation of a FreeList, which is able to generate indeices for the elements.
Definition at line 114 of file EFreeList.h.
|
inline |
Creates a new IndexPool and a FreeList.
Definition at line 118 of file EFreeList.h.
|
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.
|
inline |
Frees an element using the FreeList.
Definition at line 121 of file EFreeList.h.
|
inline |
The value indicates that all indices in 0..numUsedIndices-1 might be in use.
Definition at line 124 of file EFreeList.h.
|
protected |
The free list for allocating the memory.
Definition at line 145 of file EFreeList.h.
|
protected |
The next brand new index.
Definition at line 142 of file EFreeList.h.