-#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-2009\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
+#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