Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

Pool Class Template Reference

#include <pool.h>

Inheritance diagram for Pool:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class PoolDataType>
class NeoEngine::Pool< PoolDataType >

Pool template A pool is a hash table with mutliple objects per key. For more detailed description of the properties, read the HashTable documentation concerning the management and non-deletion principle of the data.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Types

enum  POOLDEF { DEFAULTSIZE = 256 }
 Pool defines. More...


Public Member Functions

 Pool (int iSize=DEFAULTSIZE)
 ~Pool ()
void Insert (const HashString &rstrKey, PoolDataType *pkData)
const PoolDataVec * Find (const HashString &rstrKey)
void Delete (const HashString &rstrKey, PoolDataType *pkData)
void GetAllNodes (PoolNodePtrVec *pvpkVector)
void GetAllNodeData (PoolDataVec *pvpkVector)

Protected Member Functions

PoolNodeTypeLookupNode (const HashString &rstrKey, int iIndex=0)

Protected Attributes

PoolNodeVec * m_pvkTable
int m_iSize


Member Enumeration Documentation

enum POOLDEF
 

Pool defines.

Enumeration values:
DEFAULTSIZE  Default number of buckets


Constructor & Destructor Documentation

Pool int  iSize = DEFAULTSIZE  ) 
 

Parameters:
iSize Initial size of table

~Pool  ) 
 


Member Function Documentation

PoolNode< PoolDataType > * LookupNode const HashString rstrKey,
int  iIndex = 0
[inline, protected]
 

Helper method to lookup a node

Parameters:
rstrKey Key name
iIndex Precalculated hash index
Returns:
Node associated with key

void Insert const HashString rstrKey,
PoolDataType *  pkData
 

Insert key value into pool

Parameters:
rstrKey Key name
pkData Data pointer

const Pool< PoolDataType >::PoolDataVec * Find const HashString rstrKey  ) 
 

Find data for key

Parameters:
rstrKey Key name
Returns:
Vector with data pointers if key found, 0 if not found

void Delete const HashString rstrKey,
PoolDataType *  pkData
 

Remove data from pool

Parameters:
rstrKey Key name
pkData Data ptr

void GetAllNodes PoolNodePtrVec *  pvpkVector  ) 
 

Parameters:
pvpkVector Vector recieving all nodes

void GetAllNodeData PoolDataVec *  pvpkVector  ) 
 

Parameters:
pvpkVector Vector recieving all node data pointers


Member Data Documentation

PoolNodeVec* m_pvkTable [protected]
 

Pool

int m_iSize [protected]
 

Number of rows in table


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:13 2004 for NeoEngine by doxygen 1.3.5