#define COMPONENT(__componentClass) \
__COMPONENT_GETTYPE_FUNCTIONS(__componentClass, COMPONENT) \
private: \
//------------------------------------------------------------------------------
#define COMPONENT_DERIVED(__componentClass, __baseComponentClass) \
__COMPONENT_GETTYPE_FUNCTIONS(__componentClass, COMPONENT_DERIVED) \
__COMPONENT_FULFILL_DERIVED_REQUIREMENTS(__baseComponentClass) \
private: \
//------------------------------------------------------------------------------
#define __COMPONENT_GETTYPE_FUNCTIONS(__componentClass, __componentMacroName) \
public: \
static Type getType() \
{ \
return ABUniqueTypeId<__componentClass>::getTypeId(); \
} \
\
static const char* getTypeName() \
{ \
__componentClass::wrongTypePassedTo ## __componentMacroName(); \
return #__componentClass; \
} \
\
private: \
static void wrongTypePassedTo ## __componentMacroName() { } \
//------------------------------------------------------------------------------
#define __COMPONENT_FULFILL_DERIVED_REQUIREMENTS(__baseComponentClass) \
public: \
typedef __baseComponentClass Super; \
\
static Type getBaseType() \
{ \
return Super::getType(); \
} \
\
protected: \