00001 #ifndef OBT_OLD_PLUGIN_H 00002 #define OBT_OLD_PLUGIN_H 00003 00004 #include "OBTPluginInterface.h" 00005 #include "OBTPluginLoader.h" 00006 00007 namespace OBT 00008 { 00009 struct PluginImpl ; 00015 class OBT_API OldPlugin : public PluginInterface 00016 { 00017 friend class PluginLoaderImpl ; 00018 friend struct PluginImpl ; ; 00019 protected : 00021 OldPlugin( PluginLoaderImpl::GetInformationFunc getInfo, 00022 PluginLoaderImpl::InitFunc init, 00023 PluginLoaderImpl::FinishFunc finish ) : _getInfo( getInfo ), _init( init ), _finish( finish ) {} 00025 virtual ~OldPlugin() {} 00026 public: 00029 virtual const OBT::PluginInformation& getInformation() const { return (*_getInfo)() ; } 00030 protected: 00036 virtual bool init( const std::string& prm ) { return (*_init)( prm.c_str() ) ; } 00039 virtual bool finish() { return (*_finish)() ; } 00044 virtual int type() const { return - 1 ; } 00045 private: 00046 PluginLoaderImpl::GetInformationFunc _getInfo ; 00047 PluginLoaderImpl::InitFunc _init ; 00048 PluginLoaderImpl::FinishFunc _finish ; 00049 } ; 00050 00051 } 00052 00053 #endif