00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef ARIDE_REGISTRY_H
00021 #define ARIDE_REGISTRY_H
00022
00023 #include <string.h>
00024
00025 #include <map>
00026 using namespace std;
00027
00028 #include "cm_project.h"
00029
00030 class ObjectHandler;
00031 typedef ObjectHandler * (create_objecthandler)(void);
00032
00033 class ObjectRegistryEntry
00034 {
00035 public:
00036 ObjectRegistryEntry() {CreateHandler=NULL;};
00037 ObjectRegistryEntry(create_objecthandler * inCreateHandler,ArideSection inSection)
00038 {
00039 CreateHandler = inCreateHandler;
00040 Section = inSection;
00041 };
00042 ~ObjectRegistryEntry() {;};
00043
00044 ArideSection Section;
00045 create_objecthandler * CreateHandler;
00046 };
00047
00048 struct ltstr
00049 {
00050 bool operator()(const char* s1, const char* s2) const
00051 {
00052 return strcmp(s1, s2) < 0;
00053 }
00054 };
00055
00056 typedef map<const char *, ObjectRegistryEntry,ltstr> ObjectHandlerRegistryMap;
00057 extern map<const char *, ObjectRegistryEntry,ltstr> ObjectHandlerRegistry;
00058
00059 #endif