]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface.h
...
[cpPlugins.git] / lib / cpPlugins / Interface.h
index 22d48110b123e5d6f5ecbb7597fd370b485c6f0c..655bbfa8077ea127893190349001c65549741159 100644 (file)
@@ -20,8 +20,9 @@ namespace cpPlugins
     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;
+    typedef std::pair< std::string, void* >                  TDynFileInfo;
+    typedef std::map< std::string, TDynFileInfo >            TDynLibraries;
 
   public:
     Interface( );
@@ -29,20 +30,24 @@ namespace cpPlugins
 
     const TFilters& GetFilters( );
 
+    void UpdatePaths( );
     void GuessAccesiblePlugins( );
-
-    bool LoadConfiguration( const std::string& filename );
-    bool SaveConfiguration( const std::string& filename ) const;
+    void LoadPlugin( const std::string& name );
+    void LoadPluginDir( const std::string& dirname );
     void LoadPluginFile( const std::string& filename );
-    unsigned int LoadPluginDir( const std::string& dirname );
     void UnloadAll( );
 
     cpPlugins::ProcessObject::Pointer Create(
       const std::string& category, const std::string& name
       );
+    std::string GetPluginName(
+      const std::string& category, const std::string& name
+      ) const;
+    std::vector< std::string > GetPlugins( ) const;
 
   protected:
     static void* _DLOpen( const std::string& fname );
+    static const char* _DLGetName( void* hnd );
     static TFilters _DLGetFilters( void* hnd );
     static TCreator _DLGetCreator(
       void* hnd, const std::string& category, const std::string& name
@@ -50,6 +55,7 @@ namespace cpPlugins
     static void _DLClose( void* hnd );
 
   protected:
+    std::vector< std::string > m_Paths;
     TDynLibraries m_DynLibraries;
     TDynFilters   m_DynFilters;
     TFilters      m_Filters;