# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::CClassRegistry Class Reference

The Class registry where we can instanciate IClassable objects from their names. More...

#include <class_registry.h>

List of all members.

Static Public Methods

void registerClass (const std::string &className, IClassable *(*creator)(), const std::string &typeidCheck) throw (ERegistry)
 Register your class for future Instanciation. More...

IClassablecreate (const std::string &className) throw (ERegistry)
 Create an object from his class name. More...

bool checkObject (IClassable *obj)
 check if the object has been correctly registered. Must be used for debug only, and Must compile with RTTI. More...


Static Private Methods

void init ()
 Inits the ClassRegistry (especially RegistredClasses). More...


Static Private Attributes

std::set< CClassNode > * RegistredClasses = NULL


Detailed Description

The Class registry where we can instanciate IClassable objects from their names.

Author:
Lionel Berenguier , Nevrax France
Date:
2000

Definition at line 87 of file class_registry.h.


Member Function Documentation

bool NLMISC::CClassRegistry::checkObject IClassable   obj [static]
 

check if the object has been correctly registered. Must be used for debug only, and Must compile with RTTI.

Definition at line 92 of file class_registry.cpp.

References init, and RegistredClasses.

IClassable * NLMISC::CClassRegistry::create const std::string &    className throw (ERegistry) [static]
 

Create an object from his class name.

Definition at line 51 of file class_registry.cpp.

References nlassert.

void NLMISC::CClassRegistry::init   [static, private]
 

Inits the ClassRegistry (especially RegistredClasses).

Definition at line 43 of file class_registry.cpp.

References RegistredClasses.

Referenced by checkObject.

void NLMISC::CClassRegistry::registerClass const std::string &    className,
IClassable *(*    creator)(),
const std::string &    typeidCheck
throw (ERegistry) [static]
 

Register your class for future Instanciation.

Definition at line 76 of file class_registry.cpp.

References nlstop.


Member Data Documentation

set< CClassRegistry::CClassNode > * NLMISC::CClassRegistry::RegistredClasses = NULL [static, private]
 

Definition at line 39 of file class_registry.cpp.

Referenced by checkObject, and init.


The documentation for this class was generated from the following files: