]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Manager.h
Moved to version 1.0
[cpPlugins.git] / lib / cpPlugins / Manager.h
1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4 #ifndef __cpPlugins__Manager__h__
5 #define __cpPlugins__Manager__h__
6
7 #include <map>
8 #include <cpPlugins/Library.h>
9
10 namespace cpPlugins
11 {
12   /**
13    */
14   class CPPLUGINS_EXPORT Manager
15   {
16     friend std::ostream& operator<<( std::ostream& out, const Manager& m )
17       {
18         m.Print( out );
19         return( out );
20       }
21
22   public:
23     typedef Manager Self;
24
25     typedef std::map< std::string, Library >     TLibraries;
26     typedef std::map< std::string, std::string > TPlugins;
27
28   public:
29     Manager( );
30     virtual ~Manager( );
31     void Print( std::ostream& out ) const;
32
33     const TPlugins& GetPlugins( ) const;
34
35     void Configure( );
36     void AddPath( const std::string& p );
37     void AddFile( const std::string& f );
38
39     std::shared_ptr< ProcessObject > Create( const std::string& name );
40
41   protected:
42     static bool       m_Configured;
43     static TLibraries m_Libraries;
44     static TPlugins   m_Plugins;
45   }; // end class
46 } // end namespace
47
48 #endif // __cpPlugins__Manager__h__
49
50 // eof - $RCSfile$