mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-11 02:25:59 +01:00
trunk: backport eventing from 1.4.3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// SharedLibrary.h
|
||||
//
|
||||
// $Id: //poco/1.4/Foundation/include/Poco/SharedLibrary.h#2 $
|
||||
// $Id: //poco/1.4/Foundation/include/Poco/SharedLibrary.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: SharedLibrary
|
||||
@@ -63,60 +63,60 @@ namespace Poco {
|
||||
|
||||
class Foundation_API SharedLibrary: private SharedLibraryImpl
|
||||
/// The SharedLibrary class dynamically
|
||||
/// loads shared libraries at run-time.
|
||||
/// loads shared libraries at run-time.
|
||||
{
|
||||
public:
|
||||
enum Flags
|
||||
{
|
||||
SHLIB_GLOBAL = 1,
|
||||
/// On platforms that use dlopen(), use RTLD_GLOBAL. This is the default
|
||||
/// if no flags are given.
|
||||
///
|
||||
/// This flag is ignored on platforms that do not use dlopen().
|
||||
enum Flags
|
||||
{
|
||||
SHLIB_GLOBAL = 1,
|
||||
/// On platforms that use dlopen(), use RTLD_GLOBAL. This is the default
|
||||
/// if no flags are given.
|
||||
///
|
||||
/// This flag is ignored on platforms that do not use dlopen().
|
||||
|
||||
SHLIB_LOCAL = 2
|
||||
/// On platforms that use dlopen(), use RTLD_LOCAL instead of RTLD_GLOBAL.
|
||||
///
|
||||
/// Note that if this flag is specified, RTTI (including dynamic_cast and throw) will
|
||||
/// not work for types defined in the shared library with GCC and possibly other
|
||||
/// compilers as well. See http://gcc.gnu.org/faq.html#dso for more information.
|
||||
///
|
||||
/// This flag is ignored on platforms that do not use dlopen().
|
||||
};
|
||||
|
||||
SharedLibrary();
|
||||
/// Creates a SharedLibrary object.
|
||||
|
||||
SHLIB_LOCAL = 2
|
||||
/// On platforms that use dlopen(), use RTLD_LOCAL instead of RTLD_GLOBAL.
|
||||
///
|
||||
/// Note that if this flag is specified, RTTI (including dynamic_cast and throw) will
|
||||
/// not work for types defined in the shared library with GCC and possibly other
|
||||
/// compilers as well. See http://gcc.gnu.org/faq.html#dso for more information.
|
||||
///
|
||||
/// This flag is ignored on platforms that do not use dlopen().
|
||||
};
|
||||
|
||||
SharedLibrary();
|
||||
/// Creates a SharedLibrary object.
|
||||
|
||||
SharedLibrary(const std::string& path);
|
||||
/// Creates a SharedLibrary object and loads a library
|
||||
/// from the given path.
|
||||
/// Creates a SharedLibrary object and loads a library
|
||||
/// from the given path.
|
||||
|
||||
SharedLibrary(const std::string& path, int flags);
|
||||
/// Creates a SharedLibrary object and loads a library
|
||||
/// from the given path, using the given flags.
|
||||
/// See the Flags enumeration for valid values.
|
||||
SharedLibrary(const std::string& path, int flags);
|
||||
/// Creates a SharedLibrary object and loads a library
|
||||
/// from the given path, using the given flags.
|
||||
/// See the Flags enumeration for valid values.
|
||||
|
||||
virtual ~SharedLibrary();
|
||||
/// Destroys the SharedLibrary. The actual library
|
||||
/// remains loaded.
|
||||
virtual ~SharedLibrary();
|
||||
/// Destroys the SharedLibrary. The actual library
|
||||
/// remains loaded.
|
||||
|
||||
void load(const std::string& path);
|
||||
/// Loads a shared library from the given path.
|
||||
/// Throws a LibraryAlreadyLoadedException if
|
||||
/// a library has already been loaded.
|
||||
/// Throws a LibraryLoadException if the library
|
||||
/// cannot be loaded.
|
||||
/// Throws a LibraryAlreadyLoadedException if
|
||||
/// a library has already been loaded.
|
||||
/// Throws a LibraryLoadException if the library
|
||||
/// cannot be loaded.
|
||||
|
||||
void load(const std::string& path, int flags);
|
||||
/// Loads a shared library from the given path,
|
||||
/// using the given flags. See the Flags enumeration
|
||||
/// for valid values.
|
||||
/// Throws a LibraryAlreadyLoadedException if
|
||||
/// a library has already been loaded.
|
||||
/// Throws a LibraryLoadException if the library
|
||||
/// cannot be loaded.
|
||||
void load(const std::string& path, int flags);
|
||||
/// Loads a shared library from the given path,
|
||||
/// using the given flags. See the Flags enumeration
|
||||
/// for valid values.
|
||||
/// Throws a LibraryAlreadyLoadedException if
|
||||
/// a library has already been loaded.
|
||||
/// Throws a LibraryLoadException if the library
|
||||
/// cannot be loaded.
|
||||
|
||||
void unload();
|
||||
void unload();
|
||||
/// Unloads a shared library.
|
||||
|
||||
bool isLoaded() const;
|
||||
|
||||
Reference in New Issue
Block a user