00001 #ifndef VIRTUAL_LIBRARY_CLASS
00002 #define VIRTUAL_LIBRARY_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <basis/definitions.h>
00019 #include "opsysdll.h"
00020
00022
00029 namespace library_plugins {
00030
00032 class OPSYSTEM_CLASS_STYLE vl_data_pack { public: virtual ~vl_data_pack(); };
00033
00034 class OPSYSTEM_CLASS_STYLE virtual_library
00035 {
00036 public:
00037 virtual ~virtual_library();
00038
00039 virtual virtual_library *create_instance(vl_data_pack ¶meters) = 0;
00041
00046 };
00047
00049
00056 #define DEFINE_VIRTUAL_LIBRARY(library_class_name) \
00057 extern "C" { \
00058 virtual_library HOOPLE_DLL_EXPORT_FUNCTION *static_create_instance \
00059 (vl_data_pack ¶meters) \
00060 { library_class_name blank; return blank.create_instance(parameters); } \
00061 }
00062
00064
00066 #define STATIC_CREATE_INSTANCE_NAME "static_create_instance"
00067
00068 }
00069
00070 #endif // outer guard
00071