]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface.h
...
[cpPlugins.git] / lib / cpPlugins / Interface.h
index 7c860db3b584e81f6d2d8208a931a5d14c6f3ff2..61ddf3ba76f7b8fd6c46e84b46669af4d3576e20 100644 (file)
@@ -4,6 +4,7 @@
 #include <cpPlugins/Config.h>
 #include <cpPlugins/ProcessObject.h>
 #include <map>
+#include <set>
 #include <string>
 
 namespace cpPlugins
@@ -13,8 +14,14 @@ namespace cpPlugins
   class cpPlugins_EXPORT Interface
   {
   public:
-    typedef std::map< std::string, std::string > TStringRow;
-    typedef std::map< std::string, TStringRow >  TFilters;
+    typedef Interface Self;
+
+    typedef cpPlugins::ProcessObject::Pointer ( *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( );
@@ -30,8 +37,17 @@ namespace cpPlugins
       );
 
   protected:
-    std::map< std::string, void* > m_Plugins;
-    TFilters m_Filters;
+    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