Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csPolygonStubPool Class Reference

This is an object pool which holds objects of type csPolygonStub. More...

#include <treeobj.h>

List of all members.

Public Methods

 csPolygonStubPool ()
 Create an empty pool.

 ~csPolygonStubPool ()
 Destroy pool and all objects in the pool.

csPolygonStubAlloc (csPolygonStubFactory *factory)
 Allocate a new object in the pool. More...

void Free (csPolygonStub *ps)
 Free an object and put it back in the pool. More...

void Dump ()
 Dump some information about this pool.


Detailed Description

This is an object pool which holds objects of type csPolygonStub.

You control which type of csPolygonStub you need by the factory that you give with Alloc(). You can ask new instances from this pool. If needed it will allocate one for you but ideally it can give you one which was allocated earlier.


Member Function Documentation

csPolygonStub * csPolygonStubPool::Alloc ( csPolygonStubFactory * factory )
 

Allocate a new object in the pool.

The object is initialized to empty.

void csPolygonStubPool::Free ( csPolygonStub * ps )
 

Free an object and put it back in the pool.

This function will call DecRef on the stub and only free it for real if the ref counter reaches zero. Note that it is only legal to free objects which were allocated from the pool.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000