X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FPlugins.h;h=f93f3770c9fe809592d11c2605caf55dc22a5ceb;hb=de874ea850042e77a99a456188f423c8df2e374f;hp=57ffe3f14a16f00acd30d1cb74e1661c9150ae3f;hpb=55743f4ff8867c0075518dcc6b76745722ce60ed;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Plugins.h b/lib/cpPlugins/Interface/Plugins.h index 57ffe3f..f93f377 100644 --- a/lib/cpPlugins/Interface/Plugins.h +++ b/lib/cpPlugins/Interface/Plugins.h @@ -55,13 +55,14 @@ namespace cpPlugins void SetApplication( BaseApplication* a ); // Plugins management - bool LoadPlugins( ); + bool LoadPluginsPath( const std::string& path, bool r = false ); bool LoadPlugins( const std::string& fname ); bool LoadPluginsConfigurationFile( const std::string& fname ); const TStringContainer& GetLoadedPlugins( ) const; + void GetLoadedCategories( TStringContainer& categories ) const; void GetLoadedFilters( TStringContainer& filters ) const; const TStringContainer& GetLoadedFilters( - const std::string& plugin + const std::string& category ) const; // Interactors @@ -89,10 +90,10 @@ namespace cpPlugins ); std::string ReadMesh( const std::string& parent ); - std::string WriteDataObject( + bool WriteDataObject( const std::string& fname, const std::string& name ); - std::string WriteDataObject( const std::string& name ); + bool WriteDataObject( const std::string& name ); // Data objects void ClearDataObjects( ); @@ -126,10 +127,16 @@ namespace cpPlugins TParameters* GetActiveFilterParameters( ); const TParameters* GetActiveFilterParameters( ) const; TProcessObject::DialogResult ConfigureActiveFilter( ); - std::string UpdateActiveFilter( ); + bool UpdateActiveFilter( + TStringContainer& outputs, + const std::string& parent + ); protected: void _UpdateLoadedPluginsInformation( ); + bool _ActivateIOFilter( const std::string& filter ); + std::string _ReadData( const std::string& parent ); + bool _WriteData( const std::string& name ); bool _InsertNewData( TDataObject* dobj, const std::string& parent ); protected: @@ -138,7 +145,7 @@ namespace cpPlugins BaseApplication* m_Application; // Plugins interface - TInterface* m_Interface; + TInterface m_Interface; TStringContainer m_LoadedPlugins; std::string m_LastLoadedPlugin; std::map< std::string, TStringContainer > m_LoadedFilters; @@ -146,7 +153,6 @@ namespace cpPlugins // Loaded filters std::map< std::string, TProcessObject::Pointer > m_IOFilters; TProcessObject::Pointer m_ActiveFilter; - std::map< std::string, std::string > m_ActiveFilterOutputs; // Loaded data objects typedef std::pair< std::string, TDataObject::Pointer > _TTreeNode;