ObjectBucket Struct Reference

#include <mapcomposite.hpp>

List of all members.


Detailed Description

Pool of public IDs for MovingObjects on a map.

By maintaining public ID availability using bits, it can locate an available public ID fast while using minimal memory access.

Definition at line 149 of file mapcomposite.hpp.

Public Member Functions

 ObjectBucket ()
int allocate ()
void deallocate (int)

Public Attributes

unsigned bitmap [256/int_bitsize]
 Bitmap of free locations.
short free
 Number of empty places.
short next_object
 Next object to look at.
MovingObjectobjects [256]

Static Public Attributes

int const int_bitsize = sizeof(unsigned) * 8


Constructor & Destructor Documentation

ObjectBucket::ObjectBucket  ) 
 

Definition at line 263 of file mapcomposite.cpp.


Member Function Documentation

int ObjectBucket::allocate  ) 
 

Definition at line 273 of file mapcomposite.cpp.

void ObjectBucket::deallocate int   ) 
 

Definition at line 319 of file mapcomposite.cpp.


Member Data Documentation

unsigned ObjectBucket::bitmap[256/int_bitsize]
 

Bitmap of free locations.

Definition at line 152 of file mapcomposite.hpp.

short ObjectBucket::free
 

Number of empty places.

Definition at line 153 of file mapcomposite.hpp.

int const ObjectBucket::int_bitsize = sizeof(unsigned) * 8 [static]
 

Definition at line 151 of file mapcomposite.hpp.

short ObjectBucket::next_object
 

Next object to look at.

Definition at line 154 of file mapcomposite.hpp.

MovingObject* ObjectBucket::objects[256]
 

Definition at line 155 of file mapcomposite.hpp.


The documentation for this struct was generated from the following files:
Generated on Fri Mar 30 15:39:18 2007 for TMW Server by  doxygen 1.3.9.1