Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / bases / DynLibLoaderWin.hxx
diff --git a/src/bases/DynLibLoaderWin.hxx b/src/bases/DynLibLoaderWin.hxx
new file mode 100644 (file)
index 0000000..39eb594
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __DYNLIBLOADERWIN_HXX__
+#define __DYNLIBLOADERWIN_HXX__
+
+#include <string>
+
+namespace YACS
+{
+  namespace BASES
+  {
+    class DynLibLoaderWin
+    {
+    private:
+      void *_handleOnLoadedLib;
+      std::string _libName;
+      static const char _extForDynLib[];
+    public:
+      DynLibLoaderWin(const std::string& libNameWithoutExtension);
+      ~DynLibLoaderWin();
+      bool isLibFileFindable() const;
+      int appendDirInSearchPath(const std::string& dirName);
+      int removeDirInSearchPath(const std::string& dirName);
+      void *getHandleOnSymbolWithName(const std::string& symbName);
+      static const char *getExtensionForDynLib();
+    private:
+      void loadLib();//! load lib without regarding that _libName is reachable
+      void *resolveSymb(const std::string& symbName);
+    };
+  }
+}
+
+#endif