librtl

dyn_collectable Class Reference

Class whose dynamic instances are collected. More...

#include <collect_alloc.h>

Inherited by rtl_light, rtl_material, rtl_subobject and rtl_texture.

List of all members.

Public Members

Static Public Members


Detailed Description

Class whose dynamic instances are collected.

All sub-classes of this class have automatic collection of dynamic instances such that the user does not have to delete the objects that are new 'ed. In this library the following objects use this class: rtl_object rtl_material rtl_light. These objects will automatically collect the dynamic instances of themselves created during run-time and when the application terminates will be deleted.

In order to provide more flexibility there is a provision to create and set the collecting object. In this way it is possible to collect dynamic objects and delete them when the collect_alloc object is deleted.


Member Function Documentation

virtual dyn_collectable::~dyn_collectable() [virtual]

void* dyn_collectable::operator new( size_t size )

Creates a new collectable object. It causes the object to be included in a collection of like objects.

void dyn_collectable::operator delete( void* _o )

Deletes a collected object, if the collection itself is not being destroyed nothing actually happens.

void dyn_collectable::collector( collect_alloc* ) [static]

Set the allocation collection object.

collect_alloc* dyn_collectable::collector() [static]

Creates a new allocation collection object.


The documentation for this class was generated from the following file:
JSP / librtl v0.2 mtigges@cpsc.ucalgary.ca