1 #ifndef __CPPLUGINS__INTERFACE__H__
2 #define __CPPLUGINS__INTERFACE__H__
4 #include <cpPlugins/Config.h>
5 #include <cpPlugins/ProcessObject.h>
14 class cpPlugins_EXPORT Interface
17 typedef Interface Self;
19 typedef void* ( *TCreator )( );
20 typedef std::pair< std::string, TCreator > TDynFunc;
21 typedef std::map< std::string, TDynFunc > TDynFilter;
22 typedef std::map< std::string, TDynFilter > TDynFilters;
23 typedef std::map< std::string, void* > TDynLibraries;
24 typedef std::map< std::string, std::set< std::string > > TFilters;
28 virtual ~Interface( );
30 const TFilters& GetFilters( );
32 void GuessAccesiblePlugins( );
34 bool LoadConfiguration( const std::string& filename );
35 bool SaveConfiguration( const std::string& filename ) const;
36 void LoadPluginFile( const std::string& filename );
37 unsigned int LoadPluginDir( const std::string& dirname );
40 cpPlugins::ProcessObject::Pointer Create(
41 const std::string& category, const std::string& name
45 static void* _DLOpen( const std::string& fname );
46 static TFilters _DLGetFilters( void* hnd );
47 static TCreator _DLGetCreator(
48 void* hnd, const std::string& category, const std::string& name
50 static void _DLClose( void* hnd );
53 TDynLibraries m_DynLibraries;
54 TDynFilters m_DynFilters;
60 #endif // __CPPLUGINS__INTERFACE__H__