BazisLib::UniqueIdPool Class Reference

#include <uidpool.h>

Collaboration diagram for BazisLib::UniqueIdPool:

Collaboration graph
[legend]

List of all members.

Public Types

typedef INT_PTR _type

Public Member Functions

 UniqueIdPool (unsigned MaxIDCount)
 ~UniqueIdPool ()
_type AllocateID ()
void ReleaseID (_type ID)

Static Public Attributes

static const _type BadID = -1

Private Attributes

_typem_pValues
_typem_pFirstFree
InProcessMutex m_AccessLock


Detailed Description

The UniqueIdPool class allows maintains a list of IDs allowing clients to allocate/release some of them. If you want to assign a locally unique ID to any newly created object, consider using this class. It has constant running time for both allocation and freeing operations.

Member Typedef Documentation


Constructor & Destructor Documentation

BazisLib::UniqueIdPool::UniqueIdPool ( unsigned  MaxIDCount  )  [inline]

BazisLib::UniqueIdPool::~UniqueIdPool (  )  [inline]


Member Function Documentation

_type BazisLib::UniqueIdPool::AllocateID (  )  [inline]

void BazisLib::UniqueIdPool::ReleaseID ( _type  ID  )  [inline]


Member Data Documentation

const _type BazisLib::UniqueIdPool::BadID = -1 [static]


The documentation for this class was generated from the following file:
SourceForge.net Logo