-#ifdef USE_ECLASSMANAGER_DEFINE
-#ifndef __ECLASSMANAGERTABLENAME
-#define __ECLASSMANAGERTABLENAME g_EClassManagerTable
-#endif
-#define Eclass_InsertAlphabetized __ECLASSMANAGERTABLENAME.m_pfnEclass_InsertAlphabetized
-#define Get_Eclass_E __ECLASSMANAGERTABLENAME.m_pfnGet_Eclass_E
-#define Set_Eclass_Found __ECLASSMANAGERTABLENAME.m_pfnSet_Eclass_Found
-#define Get_Parsing_Single __ECLASSMANAGERTABLENAME.m_pfnGet_Parsing_Single
-#define EClass_Create __ECLASSMANAGERTABLENAME.m_pfnEClass_Create
-#define Eclass_ForName __ECLASSMANAGERTABLENAME.m_pfnEclass_ForName
-#endif
+class ModuleObserver;
+
+
+struct EntityClassManager
+{
+ INTEGER_CONSTANT( Version, 1 );
+ STRING_CONSTANT( Name, "eclassmanager" );
+
+ EntityClass* ( *findOrInsert )( const char* name, bool has_brushes );
+ const ListAttributeType* ( *findListType )(const char* name);
+ void ( *forEach )( EntityClassVisitor& visitor );
+ void ( *attach )( ModuleObserver& observer );
+ void ( *detach )( ModuleObserver& observer );
+ void ( *realise )();
+ void ( *unrealise )();
+};
+
+template<typename Type>
+class GlobalModule;
+typedef GlobalModule<EntityClassManager> GlobalEntityClassManagerModule;
+
+template<typename Type>
+class GlobalModuleRef;
+typedef GlobalModuleRef<EntityClassManager> GlobalEntityClassManagerModuleRef;
+
+inline EntityClassManager& GlobalEntityClassManager(){
+ return GlobalEntityClassManagerModule::getTable();
+}