Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef CLASS_LOADER_REGISTER_MACRO_H_DEFINED
00031 #define CLASS_LOADER_REGISTER_MACRO_H_DEFINED
00032
00033 #include "class_loader_core.h"
00034 #include <console_bridge/console.h>
00035
00036 #include "class_loader/console_bridge_compatibility.h"
00037
00038 #define CLASS_LOADER_REGISTER_CLASS_INTERNAL_WITH_MESSAGE(Derived, Base, UniqueID, Message) \
00039 namespace \
00040 {\
00041 struct ProxyExec##UniqueID \
00042 {\
00043 typedef Derived _derived; \
00044 typedef Base _base; \
00045 ProxyExec##UniqueID() \
00046 { \
00047 if(std::string(Message)!="")\
00048 CONSOLE_BRIDGE_logInform("%s", Message);\
00049 class_loader::class_loader_private::registerPlugin<_derived, _base>(#Derived, #Base); \
00050 }\
00051 };\
00052 static ProxyExec##UniqueID g_register_plugin_##UniqueID;\
00053 }
00054
00055 #define CLASS_LOADER_REGISTER_CLASS_INTERNAL_HOP1_WITH_MESSAGE(Derived, Base, UniqueID, Message) CLASS_LOADER_REGISTER_CLASS_INTERNAL_WITH_MESSAGE(Derived, Base, UniqueID, Message)
00056
00061 #define CLASS_LOADER_REGISTER_CLASS_WITH_MESSAGE(Derived, Base, Message) CLASS_LOADER_REGISTER_CLASS_INTERNAL_HOP1_WITH_MESSAGE(Derived, Base, __COUNTER__, Message)
00062
00067 #define CLASS_LOADER_REGISTER_CLASS(Derived, Base) CLASS_LOADER_REGISTER_CLASS_WITH_MESSAGE(Derived, Base, "")
00068
00069 #endif
00070