]> Dogcows Code - chaz/yoink/blobdiff - src/stlplus/portability/dynaload.hpp
import stlplus 3.7
[chaz/yoink] / src / stlplus / portability / dynaload.hpp
index d35d324112497f6937255115f7902c0b3dbe52b8..edfee988e2f8a60e36f0ba4695a9cbf3dd801252 100644 (file)
@@ -1,86 +1,86 @@
-#ifndef STLPLUS_DYNALOAD
-#define STLPLUS_DYNALOAD
-////////////////////////////////////////////////////////////////////////////////
-
-//   Author:    Andy Rushton
-//   Copyright: (c) Southampton University 1999-2004
-//              (c) Andy Rushton           2004-2009
-//   License:   BSD License, see ../docs/license.html
-
-//   A portable interface to the dynamic loader - i.e. the system for loading
-//   dynamic libraries or shared libraries during the running of a program,
-//   rather than by linking
-
-////////////////////////////////////////////////////////////////////////////////
-#include "portability_fixes.hpp"
-#include <string>
-
-namespace stlplus
-{
-
-  //////////////////////////////////////////////////////////////////////////////
-  // dynaload class manages a dynamic loadable library and unloads it on destruction
-
-  class dynaload
-  {
-  public:
-
-    ////////////////////////////////////////////////////////////////////////////
-    // library management
-
-    // construct the object but do not load
-    dynaload(void);
-
-    // construct and load
-    dynaload(const std::string& library);
-
-    // destroy and unload if loaded
-    ~dynaload(void);
-
-    // load the library - return success or fail
-    bool load(const std::string& library);
-
-    // unload the library if loaded
-    bool unload(void);
-
-    // test whether the library is loaded
-    bool loaded(void) const;
-
-    ////////////////////////////////////////////////////////////////////////////
-    // symbol management
-
-    // test whether a function is exported by the library
-    bool present(const std::string& name);
-
-    // get the function as a generic pointer
-    void* symbol(const std::string& name);
-
-    ////////////////////////////////////////////////////////////////////////////
-    // error management
-
-    // enum values to indicate type of error
-    enum error_t {no_error, load_error, unload_error, symbol_error};
-
-    // test whether there has been an error
-    bool error(void) const;
-
-    // clear an error once it has been handled (or ignored)
-    void clear_error(void);
-
-    // get the type of the error as indicated by the enum error_t
-    error_t error_type(void) const;
-
-    // get the text of the error as provided by the OS
-    std::string error_text(void) const;
-
-    ////////////////////////////////////////////////////////////////////////////
-
-  private:
-    void* m_handle;
-    error_t m_error;
-    std::string m_text;
-  };
-
-}
-
-#endif
+#ifndef STLPLUS_DYNALOAD\r
+#define STLPLUS_DYNALOAD\r
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+//   Author:    Andy Rushton\r
+//   Copyright: (c) Southampton University 1999-2004\r
+//              (c) Andy Rushton           2004 onwards\r
+//   License:   BSD License, see ../docs/license.html\r
+\r
+//   A portable interface to the dynamic loader - i.e. the system for loading\r
+//   dynamic libraries or shared libraries during the running of a program,\r
+//   rather than by linking\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+#include "portability_fixes.hpp"\r
+#include <string>\r
+\r
+namespace stlplus\r
+{\r
+\r
+  //////////////////////////////////////////////////////////////////////////////\r
+  // dynaload class manages a dynamic loadable library and unloads it on destruction\r
+\r
+  class dynaload\r
+  {\r
+  public:\r
+\r
+    ////////////////////////////////////////////////////////////////////////////\r
+    // library management\r
+\r
+    // construct the object but do not load\r
+    dynaload(void);\r
+\r
+    // construct and load\r
+    dynaload(const std::string& library);\r
+\r
+    // destroy and unload if loaded\r
+    ~dynaload(void);\r
+\r
+    // load the library - return success or fail\r
+    bool load(const std::string& library);\r
+\r
+    // unload the library if loaded\r
+    bool unload(void);\r
+\r
+    // test whether the library is loaded\r
+    bool loaded(void) const;\r
+\r
+    ////////////////////////////////////////////////////////////////////////////\r
+    // symbol management\r
+\r
+    // test whether a function is exported by the library\r
+    bool present(const std::string& name);\r
+\r
+    // get the function as a generic pointer\r
+    void* symbol(const std::string& name);\r
+\r
+    ////////////////////////////////////////////////////////////////////////////\r
+    // error management\r
+\r
+    // enum values to indicate type of error\r
+    enum error_t {no_error, load_error, unload_error, symbol_error};\r
+\r
+    // test whether there has been an error\r
+    bool error(void) const;\r
+\r
+    // clear an error once it has been handled (or ignored)\r
+    void clear_error(void);\r
+\r
+    // get the type of the error as indicated by the enum error_t\r
+    error_t error_type(void) const;\r
+\r
+    // get the text of the error as provided by the OS\r
+    std::string error_text(void) const;\r
+\r
+    ////////////////////////////////////////////////////////////////////////////\r
+\r
+  private:\r
+    void* m_handle;\r
+    error_t m_error;\r
+    std::string m_text;\r
+  };\r
+\r
+}\r
+\r
+#endif\r
This page took 0.022552 seconds and 4 git commands to generate.