Class Index | Cross Index | Namespace Index |
Object Registry
Contained in: global
Derived from:
none
Derived by:
none
#include "general/objectregistry.hh"
public function member index: |
|||
ObjectRegistry | (); | ||
~ObjectRegistry | (); | ||
bool | destructObject | (T* o); | |
Op | for_each | (Op Function) const; | |
bool | isRegistered | (const T* o); | |
void | registerObject | (T* o); | |
bool | removeObject | (T* o); | |
void | reset | (); | |
size_t | size | () const; | |
protected function member index: |
|||
iterator | begin | (); | Obtain the start of the list |
const_iterator | begin | () const; | Obtain the start of the list (read-only) |
iterator | end | (); | Obtain the end of the list |
const_iterator | end | () const; | Obtain the end of the list (read-only) |
The registry owns its objects. That is, when the registry is destructed it destructs any objects which are registered with it.
A STL set is used to store pointers to the registered objects.
This class is used by the LDAS API's to keep track of pointer objects returned to the TCL layer. To avoid segmentation faults, when the C++ layer receives a pointer from TCL, the appropriate ObjectRegistry object is checked to ensure that the pointer exists. Furthermore, the resetApi command causes the C++ layer to empty the ObjectRegistry objects, thereby
objects.