From: Christian P. <cp...@us...> - 2004-12-23 05:27:57
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24631/include/pclasses/System Modified Files: SharedLib.h Log Message: Added std::string support. Append platform specific file extenstion to shared lib name. Converted SharedLib::_handle to unsigned long. Index: SharedLib.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/SharedLib.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SharedLib.h 23 Dec 2004 04:32:17 -0000 1.2 +++ SharedLib.h 23 Dec 2004 05:27:48 -0000 1.3 @@ -21,10 +21,15 @@ #ifndef P_System_SharedLib_h #define P_System_SharedLib_h +#include <pclasses/pclasses-config.h> #include <pclasses/NonCopyable.h> #include <pclasses/Unicode/String.h> #include <pclasses/System/SystemError.h> +#ifdef PCLASSES_WITH_STL +# include <string> +#endif + namespace P { namespace System { @@ -61,6 +66,11 @@ SharedLib(const Unicode::String& name, BindMode mode = BindLazy) throw(SystemError); +#ifdef PCLASSES_WITH_STL + SharedLib(const std::string& name, BindMode mode = BindLazy) + throw(SystemError); +#endif + //! Destructor /*! The destructor unloads the shared library from memory. @@ -76,9 +86,12 @@ */ void* operator[](const char* symbol) throw(RuntimeError); +#ifdef PCLASSES_WITH_STL + void* operator[](const std::string& symbol) throw(RuntimeError); +#endif + private: - struct Handle; - Handle* _handle; + unsigned long _handle; }; } // !namespace System |