]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Library.h
Moved to version 1.0
[cpPlugins.git] / lib / cpPlugins / Library.h
diff --git a/lib/cpPlugins/Library.h b/lib/cpPlugins/Library.h
new file mode 100644 (file)
index 0000000..0657608
--- /dev/null
@@ -0,0 +1,47 @@
+// =========================================================================
+// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+// =========================================================================
+#ifndef __cpPlugins__Library__h__
+#define __cpPlugins__Library__h__
+
+#include <cpPlugins/Config.h>
+#include <set>
+
+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$