#ifndef __CPPLUGINS__INTERFACE__H__ #define __CPPLUGINS__INTERFACE__H__ #include #include #include #include #include namespace cpPlugins { /** */ class cpPlugins_EXPORT Interface { public: typedef Interface Self; typedef void* ( *TCreator )( ); typedef std::pair< std::string, TCreator > TDynFunc; typedef std::map< std::string, TDynFunc > TDynFilter; typedef std::map< std::string, TDynFilter > TDynFilters; typedef std::map< std::string, void* > TDynLibraries; typedef std::map< std::string, std::set< std::string > > TFilters; public: Interface( ); virtual ~Interface( ); const TFilters& GetFilters( ); bool LoadConfiguration( const std::string& filename ); bool SaveConfiguration( const std::string& filename ) const; void LoadPluginFile( const std::string& filename ); void UnloadAll( ); cpPlugins::ProcessObject::Pointer Create( const std::string& category, const std::string& name ); protected: static void* _DLOpen( const std::string& fname ); static TFilters _DLGetFilters( void* hnd ); static TCreator _DLGetCreator( void* hnd, const std::string& category, const std::string& name ); static void _DLClose( void* hnd ); protected: TDynLibraries m_DynLibraries; TDynFilters m_DynFilters; TFilters m_Filters; }; } // ecapseman #endif // __CPPLUGINS__INTERFACE__H__ // eof - $RCSfile$