00001 #ifndef OBT_BASIC_PLUGIN_H 00002 #define OBT_BASIC_PLUGIN_H 00003 00004 #include "OBTPluginInterface.h" 00005 #include "OBTPluginInformation.h" 00006 00017 #define OBT_EXPORT_BASIC_PLUGIN_API( Informations ) \ 00018 extern "C" \ 00019 { \ 00020 OBT_EXPORT_API_DECL OBT::PluginInterface* get_OBT_PluginInterface() \ 00021 { \ 00022 static OBT::BasicPlugin _pluginInterface( Informations ) ; \ 00023 return &_pluginInterface ; \ 00024 } \ 00025 } 00026 00027 namespace OBT 00028 { 00032 class OBT_API BasicPlugin : public PluginInterface 00033 { 00034 protected : 00036 BasicPlugin( const OBT::PluginInformation& info ) : PluginInterface(), _information( info ) {} 00037 public: 00039 virtual ~BasicPlugin() {} 00042 virtual const OBT::PluginInformation& getInformation() const { return _information ; } 00047 virtual int type() const { return 0 ; } 00048 protected: 00049 friend class PluginLoaderImpl ; 00055 virtual bool init( const std::string& prm ) { return true ; } 00058 virtual bool finish() { return true ; } 00059 00060 OBT::PluginInformation _information ; 00061 } ; 00062 } 00063 00064 #endif