PluginC.cpp
Go to the documentation of this file.
1 #include "MyFactory.h"
2 
3 
4 // for Windows DLL export
5 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
6 # define DLL_EXPORT __declspec(dllexport)
7 #else
8 # define DLL_EXPORT
9 #endif /* Windows */
10 
11 
12 class C
13  : public Base
14 {
15 public:
16  C()
17  {
18  }
19  virtual std::string name()
20  {
21  return "C";
22  }
23 };
24 
25 extern "C"
26 {
27  DLL_EXPORT void PluginCInit();
28  void PluginCInit()
29  {
30  MyFactory::instance().addFactory("C",
31  coil::Creator<Base, C>,
32  coil::Destructor<Base, C>);
33  }
34 
35 
36 };
Definition: MyFactory.h:5
Definition: PluginC.cpp:12
virtual std::string name()
Definition: PluginC.cpp:19
static GlobalFactory< AbstractClass, Identifier, Compare, Creator, Destructor > & instance()
Create instance.
Definition: Singleton.h:131
DLL_EXPORT void PluginCInit()
Definition: PluginC.cpp:28
#define DLL_EXPORT
Definition: PluginC.cpp:8
C()
Definition: PluginC.cpp:16


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:54