1 #ifndef __CPPLUGINS__INTERFACE__WORKSPACE__H__
2 #define __CPPLUGINS__INTERFACE__WORKSPACE__H__
4 #include <cpPlugins/Interface/Interface.h>
5 #include <cpPlugins/Interface/DataObject.h>
6 #include <cpPlugins/Interface/ProcessObject.h>
18 class cpPlugins_Interface_EXPORT Workspace
21 typedef cpPlugins::Interface::Interface TInterface;
22 typedef cpPlugins::Interface::Object TObject;
23 typedef cpPlugins::Interface::ProcessObject TFilter;
24 typedef cpPlugins::Interface::DataObject TData;
25 typedef TFilter::TParameters TParameters;
28 typedef std::set< std::string > TStringContainer;
31 typedef std::map< std::string, TObject::Pointer > TVertices;
32 typedef std::pair< std::string, std::string > TConnection;
33 typedef std::vector< TConnection > TConnections;
34 typedef std::map< std::string, TConnections > TAdjMatrixRow;
35 typedef std::map< std::string, TAdjMatrixRow > TAdjMatrix;
39 virtual ~Workspace( );
42 bool LoadPluginsPath( const std::string& path, bool r = false );
43 bool LoadPlugins( const std::string& fname );
44 const TStringContainer& GetLoadedPlugins( ) const;
45 void GetLoadedPluginCategories( TStringContainer& categories ) const;
46 void GetLoadedPluginFilters( TStringContainer& filters ) const;
47 const TStringContainer& GetLoadedPluginFilters(
48 const std::string& category
52 std::string LoadWorkspace( const std::string& fname );
53 std::string SaveWorkspace( const std::string& fname ) const;
56 bool CreateFilter( const std::string& filter, const std::string& name );
58 const std::string& orig_filter, const std::string& dest_filter,
59 const std::string& output_name,
60 const std::string& input_name
62 TParameters* GetParameters( const std::string& name );
63 const TParameters* GetParameters( const std::string& name ) const;
66 bool Reduce( const std::string& name );
69 std::string Execute( );
70 std::string Execute( const std::string& name );
73 void _UpdateLoadedPluginsInformation( );
77 TInterface m_Interface;
78 std::string m_LastLoadedPlugin;
79 TStringContainer m_LoadedPlugins;
80 std::map< std::string, TStringContainer > m_LoadedFilters;
84 TAdjMatrix m_AdjMatrix;
91 #endif // __CPPLUGINS__INTERFACE__WORKSPACE__H__