]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Library.h
Moved to version 1.0
[cpPlugins.git] / lib / cpPlugins / Library.h
1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4 #ifndef __cpPlugins__Library__h__
5 #define __cpPlugins__Library__h__
6
7 #include <cpPlugins/Config.h>
8 #include <set>
9
10 namespace cpPlugins
11 {
12   class ProcessObject;
13
14   /**
15    */
16   class CPPLUGINS_EXPORT Library
17   {
18   public:
19     typedef Library Self;
20
21     typedef std::set< std::string > TStringSet;
22
23   public:
24     Library( const std::string& fname );
25     virtual ~Library( );
26
27     bool Provides( const std::string& fname ) const;
28     const TStringSet& GetContents( ) const;
29     std::shared_ptr< ProcessObject > Create( const std::string& name );
30
31     const std::string& GetPath( ) const;
32
33   protected:
34     void _LoadLibrary( );
35     void* _CreateObject( const std::string& name );
36
37   protected:
38     std::string m_Path;
39     std::string m_Name;
40     void*       m_Handle;
41     TStringSet  m_Contents;
42   }; // end class
43 } // end namespace
44
45 #endif // __cpPlugins__Library__h__
46
47 // eof - $RCSfile$