X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FLibrary.h;fp=lib%2FcpPlugins%2FLibrary.h;h=0657608b65e9cf5cafa922eb388eb74b043e3340;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=0000000000000000000000000000000000000000;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpPlugins/Library.h b/lib/cpPlugins/Library.h new file mode 100644 index 0000000..0657608 --- /dev/null +++ b/lib/cpPlugins/Library.h @@ -0,0 +1,47 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= +#ifndef __cpPlugins__Library__h__ +#define __cpPlugins__Library__h__ + +#include +#include + +namespace cpPlugins +{ + class ProcessObject; + + /** + */ + class CPPLUGINS_EXPORT Library + { + public: + typedef Library Self; + + typedef std::set< std::string > TStringSet; + + public: + Library( const std::string& fname ); + virtual ~Library( ); + + bool Provides( const std::string& fname ) const; + const TStringSet& GetContents( ) const; + std::shared_ptr< ProcessObject > Create( const std::string& name ); + + const std::string& GetPath( ) const; + + protected: + void _LoadLibrary( ); + void* _CreateObject( const std::string& name ); + + protected: + std::string m_Path; + std::string m_Name; + void* m_Handle; + TStringSet m_Contents; + }; // end class +} // end namespace + +#endif // __cpPlugins__Library__h__ + +// eof - $RCSfile$