_register_creator Struct Reference

#include <object.h>

List of all members.

Public Member Functions

 _register_creator (const Object::id_t &, _creator_t)
 Register id with creator cf.


Detailed Description

Unserialization from an input stream will create an object of a now unknown class. To facilitate this process, each instantiable derived class (that is, a class with all pure virtual functions implemented) must have a creator and add it to this map. The way is to declare a static _register_creator object in the .cpp file.
 static const _register_creator _("Derived", _creator); 
See also:
C++ FAQ Lite 35.8

Definition at line 141 of file object.h.


Constructor & Destructor Documentation

_register_creator const Object::id_t id,
_creator_t  cf
 

Register id with creator cf.

Parameters:
id String of class identification.
cf Function pointer to the creator.

Definition at line 33 of file object.cpp.


The documentation for this struct was generated from the following files:
Generated on Wed Nov 8 08:16:23 2006 for LEMGA by  doxygen 1.4.6