#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>
// 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( );
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,
std::map< std::string, TStringContainer > m_LoadedFilters;
// Processing graph
- TVertices m_Vertices;
- TAdjMatrix m_AdjMatrix;
+ typename TGraph::Pointer m_Graph;
};
} // ecapseman