]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Workspace.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Workspace.h
index 1e6e6e21f4d42f20cb43e752aae68143c8de2db3..fd9847b20a81b58215082a795e32bf6d0a81d8bb 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef __cpPlugins__Interface__Workspace__h__
 #define __cpPlugins__Interface__Workspace__h__
 
-#include <cpPlugins/Interface/Plugins.h>
-#include <cpPlugins/BaseObjects/DataObject.h>
-#include <cpPlugins/BaseObjects/ProcessObject.h>
-#include <cpPlugins/BaseObjects/Widget.h>
+#include <cpPlugins/Interface/Loader.h>
+#include <cpPlugins/Pipeline/DataObject.h>
+#include <cpPlugins/Pipeline/ProcessObject.h>
+#include <cpPlugins/Pipeline/Widget.h>
 #include <itkObject.h>
 
 class vtkRenderWindowInteractor;
@@ -24,9 +24,10 @@ namespace cpPlugins
       typedef itk::SmartPointer< Self >       Pointer;
       typedef itk::SmartPointer< const Self > ConstPointer;
 
-      typedef cpPlugins::BaseObjects::ProcessObject TFilter;
-      typedef cpPlugins::BaseObjects::Widget        TWidget;
-      typedef cpPlugins::Interface::Plugins         TPlugins;
+      typedef cpPlugins::Pipeline::DataObject    TDataObject;
+      typedef cpPlugins::Pipeline::ProcessObject TFilter;
+      typedef cpPlugins::Pipeline::Widget        TWidget;
+      typedef cpPlugins::Interface::Loader          TLoader;
 
       typedef std::map< std::string, TFilter::Pointer > TFilters;
 
@@ -56,6 +57,10 @@ namespace cpPlugins
       const TWidget* GetWidget( const std::string& name ) const;
       bool HasFilter( const std::string& name ) const;
       bool HasWidget( const std::string& name ) const;
+      TFilter* CreateFilter(
+        const std::string& category, const std::string& filter,
+        const std::string& name
+        );
       TFilter* CreateFilter(
         const std::string& category, const std::string& filter
         );
@@ -71,36 +76,6 @@ namespace cpPlugins
       // Interactors
       void AddInteractor( vtkRenderWindowInteractor* iren );
 
-      // Exposed ports
-      /* TODO
-         const TExposedPorts& GetExposedInputs( ) const;
-         const TExposedPorts& GetExposedOutputs( ) const;
-         cpPlugins::BaseObjects::DataObject* GetExposedOutput(
-         const std::string& name
-         );
-         const cpPlugins::BaseObjects::DataObject* GetExposedOutput(
-         const std::string& name
-         ) const;
-         bool ExposeInput(
-         const std::string& name,
-         const std::string& filter, const std::string& filter_input
-         );
-         bool ExposeOutput(
-         const std::string& name,
-         const std::string& filter, const std::string& filter_output
-         );
-         void HideInput( const std::string& name );
-         void HideOutput( const std::string& name );
-         bool RenameExposedInput(
-         const std::string& old_name,
-         const std::string& new_name
-         );
-         bool RenameExposedOutput(
-         const std::string& old_name,
-         const std::string& new_name
-         );
-      */
-
       // Connection management
       bool Connect(
         const std::string& origin_filter,
@@ -108,6 +83,11 @@ namespace cpPlugins
         const std::string& destination_filter,
         const std::string& destination_input
         );
+      bool Connect(
+        TDataObject* input,
+        const std::string& destination_filter,
+        const std::string& destination_input
+        );
       bool Disconnect(
         const std::string& origin_filter,
         const std::string& origin_output,
@@ -124,11 +104,11 @@ namespace cpPlugins
          const std::string& output_name, const std::string& input_name
          );
          void Connect(
-         cpPlugins::BaseObjects::DataObject* output,
+         cpPlugins::Pipeline::DataObject* output,
          const std::string& dest_filter, const std::string& input_name
          );
          void Connect(
-         cpPlugins::BaseObjects::DataObject* output,
+         cpPlugins::Pipeline::DataObject* output,
          const std::string& exposed_input_name
          );
          void Disconnect(
@@ -155,7 +135,7 @@ namespace cpPlugins
       Self& operator=( const Self& other );
 
     protected:
-      TPlugins::Pointer m_Plugins;
+      TLoader  m_Loader;
       TFilters m_Filters;
       bool     m_PrintExecution;