1 #ifndef __cpPlugins__Interface__Plugins__h__
2 #define __cpPlugins__Interface__Plugins__h__
4 #include <cpPlugins/Config.h>
5 #include <cpPlugins/BaseObjects/ProcessObject.h>
14 class cpPlugins_EXPORT Plugins
19 typedef itk::Object Superclass;
20 typedef itk::SmartPointer< Self > Pointer;
21 typedef itk::SmartPointer< const Self > ConstPointer;
23 typedef void* ( *TCreator )( );
24 typedef std::map< std::string, void* > TLibraries;
27 std::string PluginName;
31 typedef std::map< std::string, TCreatorData > TFilterData;
32 typedef std::map< std::string, TFilterData > TFilters;
33 typedef std::set< std::string > TStrings;
35 typedef cpPlugins::BaseObjects::ProcessObject TProcess;
38 itkTypeMacro( Plugins, itk::Object );
39 itkGetConstMacro( Paths, TStrings );
42 static Pointer New( );
43 virtual itk::LightObject::Pointer CreateAnother( ) const cpPlugins_OVERRIDE;
44 Pointer Clone( ) const;
46 TStrings GetLibraries( ) const;
47 TStrings GetPlugins( ) const;
48 TStrings GetCategories( ) const;
49 TStrings GetFilters( const std::string& category ) const;
51 void AddEnvironments( const std::string& new_environment );
52 void LoadEnvironments( );
53 void SaveEnvironments( const std::string& dir ) const;
54 void OpenEnvironments( const std::string& dir );
56 void LoadFile( const std::string& fname );
57 void LoadPlugin( const std::string& pname );
58 void LoadDirectory( const std::string& dirname );
61 TProcess::Pointer CreateProcessObject(
62 const std::string& category, const std::string& name
68 virtual void PrintSelf(
69 std::ostream& os, itk::Indent indent
70 ) const cpPlugins_OVERRIDE;
73 // Purposely not implemented
74 Plugins( const Self& other );
75 Self& operator=( const Self& other );
79 TLibraries m_Libraries;
88 #endif // __cpPlugins__Interface__Plugins__h__