1 #ifndef __CPPLUGINS__INTERFACE__WORKSPACE__H__
2 #define __CPPLUGINS__INTERFACE__WORKSPACE__H__
4 #include <cpExtensions/DataStructures/Graph.h>
5 #include <cpPlugins/Interface/Interface.h>
6 #include <cpPlugins/Interface/DataObject.h>
7 #include <cpPlugins/Interface/ProcessObject.h>
12 // Some forward declarations
21 class cpPlugins_Interface_EXPORT Workspace
24 typedef cpPlugins::Interface::Interface TInterface;
25 typedef cpPlugins::Interface::Object TObject;
26 typedef cpPlugins::Interface::ProcessObject TFilter;
27 typedef cpPlugins::Interface::DataObject TData;
28 typedef TFilter::TParameters TParameters;
31 typedef std::set< std::string > TStringContainer;
34 typedef std::pair< std::string, std::string > TConnection;
36 cpExtensions::DataStructures::
37 Graph< TObject::Pointer, TConnection, std::string > TGraph;
41 virtual ~Workspace( );
44 TInterface* GetInterface( );
45 void SetInterface( TInterface* i );
48 std::string LoadWorkspace( const std::string& fname );
49 std::string SaveWorkspace( const std::string& fname ) const;
54 const TGraph* GetGraph( ) const;
55 bool CreateFilter( const std::string& filter, const std::string& name );
57 const std::string& orig_filter, const std::string& dest_filter,
58 const std::string& output_name,
59 const std::string& input_name
61 TParameters* GetParameters( const std::string& name );
62 const TParameters* GetParameters( const std::string& name ) const;
63 TFilter* GetFilter( const std::string& name );
64 const TFilter* GetFilter( const std::string& name ) const;
65 bool HasFilter( const std::string& name ) const;
68 bool Reduce( const std::string& name );
71 std::string Execute( );
72 std::string Execute( const std::string& name, QWidget* p = NULL );
75 void _UpdateLoadedPluginsInformation( );
79 TInterface* m_Interface;
82 typename TGraph::Pointer m_Graph;
89 #endif // __CPPLUGINS__INTERFACE__WORKSPACE__H__