Go to the documentation of this file.00001 #include "MyFactory.h"
00002
00003
00004
00005 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
00006 # define DLL_EXPORT __declspec(dllexport)
00007 #else
00008 # define DLL_EXPORT
00009 #endif
00010
00011
00012 class C
00013 : public Base
00014 {
00015 public:
00016 C()
00017 {
00018 }
00019 virtual std::string name()
00020 {
00021 return "C";
00022 }
00023 };
00024
00025 extern "C"
00026 {
00027 DLL_EXPORT void PluginCInit();
00028 void PluginCInit()
00029 {
00030 MyFactory::instance().addFactory("C",
00031 coil::Creator<Base, C>,
00032 coil::Destructor<Base, C>);
00033 }
00034
00035
00036 };