Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Pool< T > Class Template Reference

#include <pool.h>

Public Member Functions

 Pool ()
 
 ~Pool ()
 
T * draw ()
 
void drop (T *p)
 

Private Member Functions

void addblock ()
 

Private Attributes

int size
 
int cblock
 
void * block [64]
 
void * next
 

Detailed Description

template<typename T>
class Pool< T >

Definition at line 61 of file pool.h.

Constructor & Destructor Documentation

◆ Pool()

template<typename T >
Pool< T >::Pool ( )
inline

Definition at line 64 of file pool.h.

References Pool< T >::block, Pool< T >::cblock, Pool< T >::next, and Pool< T >::size.

◆ ~Pool()

template<typename T >
Pool< T >::~Pool ( )
inline

Definition at line 74 of file pool.h.

References Pool< T >::block, and Pool< T >::cblock.

Member Function Documentation

◆ addblock()

template<typename T >
void Pool< T >::addblock ( )
inlineprivate

Definition at line 101 of file pool.h.

References Pool< T >::block, Pool< T >::cblock, Pool< T >::next, and Pool< T >::size.

Referenced by Pool< T >::draw().

◆ draw()

template<typename T >
T * Pool< T >::draw ( )
inline

Definition at line 81 of file pool.h.

References Pool< T >::addblock(), and Pool< T >::next.

◆ drop()

template<typename T >
void Pool< T >::drop ( T *  p)
inline

Definition at line 89 of file pool.h.

References Pool< T >::next.

Member Data Documentation

◆ block

template<typename T >
void* Pool< T >::block[64]
private

Definition at line 98 of file pool.h.

Referenced by Pool< T >::addblock(), Pool< T >::Pool(), and Pool< T >::~Pool().

◆ cblock

template<typename T >
int Pool< T >::cblock
private

Definition at line 97 of file pool.h.

Referenced by Pool< T >::addblock(), Pool< T >::Pool(), and Pool< T >::~Pool().

◆ next

template<typename T >
void* Pool< T >::next
private

Definition at line 99 of file pool.h.

Referenced by Pool< T >::addblock(), Pool< T >::draw(), Pool< T >::drop(), and Pool< T >::Pool().

◆ size

template<typename T >
int Pool< T >::size
private

Definition at line 96 of file pool.h.

Referenced by Pool< T >::addblock(), and Pool< T >::Pool().


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