MetaClass.h File Reference

#include <string>
#include <map>

Go to the source code of this file.

Classes

class  MetaClass
class  MetaClassFactory
class  MetaClassRegistration

Defines

#define __INCLUDE_MetaClassh_INCLUDE__
#define REGISTER_CLASS_HEADER(x)
#define REGISTER_CLASS_SOURCE(x)


Define Documentation

#define __INCLUDE_MetaClassh_INCLUDE__

Definition at line 22 of file MetaClass.h.

#define REGISTER_CLASS_HEADER ( x   ) 

Value:

\
class METAFACTORY_##x : public MetaClassFactory \
{ \
        virtual MetaClass *getClassCopy() { return new x ; } \
}; \
virtual const char *getClassName() { return #x ; } \
virtual unsigned int getMetaClassId() \
{ \
        static unsigned int metaClassID = nextMetaClassId_++; return metaClassID; \
}

Definition at line 27 of file MetaClass.h.

#define REGISTER_CLASS_SOURCE ( x   ) 

Value:

struct META_##x { META_##x() { MetaClassRegistration::addMap(#x , new x::METAFACTORY_##x ); } }; \
        static META_##x META_IMPL_##x ;

Definition at line 39 of file MetaClass.h.


Generated on Mon Feb 16 15:14:57 2009 for Scorched3D by  doxygen 1.5.3