MyAllocator Struct Reference

MyAllocator is a helper memory allocator for MyPoint, MyPolygon and HalfEdge objects. More...

#include <MemoryMgmt.h>

Collaboration diagram for MyAllocator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MyAllocator ()
 MyAllocator (int points, int poly, int he)
bool isNull ()
void init (int points, int poly, int he)
void clear ()
void clearMaxAlloc ()
void checkMaxAlloc () const

Public Attributes

Pool< MyPointm_pointsPool
Pool< MyPolygonm_polyPool
Pool< HalfEdgem_hePool

Detailed Description

MyAllocator is a helper memory allocator for MyPoint, MyPolygon and HalfEdge objects.

It maintains three pools for the three object classes. The method checkMaxAlloc() can be used to detect overallocation as discussed in Pool. this class is used in PicPainter and MyObject in the process of creating the pieces displa lists and in the implementation of the polygon subdivision algorithm in MyObject::subdivide()

See also:
Pool MyObject


Constructor & Destructor Documentation

MyAllocator::MyAllocator (  )  [inline]

MyAllocator::MyAllocator ( int  points,
int  poly,
int  he 
) [inline]


Member Function Documentation

bool MyAllocator::isNull (  )  [inline]

void MyAllocator::init ( int  points,
int  poly,
int  he 
) [inline]

void MyAllocator::clear (  )  [inline]

void MyAllocator::clearMaxAlloc (  )  [inline]

void MyAllocator::checkMaxAlloc (  )  const [inline]


Member Data Documentation


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