#include <MemoryMgmt.h>
Collaboration diagram for MyAllocator:
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< MyPoint > | m_pointsPool |
Pool< MyPolygon > | m_polyPool |
Pool< HalfEdge > | m_hePool |
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()
MyAllocator::MyAllocator | ( | ) | [inline] |
MyAllocator::MyAllocator | ( | int | points, | |
int | poly, | |||
int | he | |||
) | [inline] |
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] |