]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Workspace.h
Pipeline editor added.
[cpPlugins.git] / lib / cpPlugins / Interface / Workspace.h
index 863d84e7d9c597ebf224efe761a6c854ff27bd76..9bad734953c89f98b01e526db4aa21ad9af13ef2 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef __CPPLUGINS__INTERFACE__WORKSPACE__H__
 #define __CPPLUGINS__INTERFACE__WORKSPACE__H__
 
+#include <cpExtensions/DataStructures/Graph.h>
 #include <cpPlugins/Interface/Interface.h>
 #include <cpPlugins/Interface/DataObject.h>
 #include <cpPlugins/Interface/ProcessObject.h>
 
-#include <map>
 #include <set>
 #include <string>
 
@@ -27,12 +27,11 @@ namespace cpPlugins
       // Various types
       typedef std::set< std::string > TStringContainer;
 
-      // Graph types
-      typedef std::map< std::string, TObject::Pointer > TVertices;
-      typedef std::pair< std::string, std::string >     TConnection;
-      typedef std::vector< TConnection >                TConnections;
-      typedef std::map< std::string, TConnections >     TAdjMatrixRow;
-      typedef std::map< std::string, TAdjMatrixRow >    TAdjMatrix;
+      // Graph type
+      typedef std::pair< std::string, std::string > TConnection;
+      typedef
+        cpExtensions::DataStructures::
+        Graph< TObject::Pointer, TConnection, std::string > TGraph;
 
     public:
       Workspace( );
@@ -53,6 +52,8 @@ namespace cpPlugins
       std::string SaveWorkspace( const std::string& fname ) const;
 
       // Graph management
+      TGraph* GetGraph( );
+      const TGraph* GetGraph( ) const;
       bool CreateFilter( const std::string& filter, const std::string& name );
       bool Connect(
         const std::string& orig_filter, const std::string& dest_filter,
@@ -80,8 +81,7 @@ namespace cpPlugins
       std::map< std::string, TStringContainer > m_LoadedFilters;
 
       // Processing graph
-      TVertices  m_Vertices;
-      TAdjMatrix m_AdjMatrix;
+      typename TGraph::Pointer m_Graph;
     };
 
   } // ecapseman