SharedLibraryManager Class Reference
#include <SharedLibraryManager.h>
Public Member Functions | |
Constructors | |
| SharedLibraryManager (SharedLibraryPlatform *platform) | |
| virtual | ~SharedLibraryManager () |
Main usage interface | |
| virtual SharedLibrary * | load (const std::string &name, int openFlags=0) |
| Attempts to load/initialize the given shared library, optionally specifying the given open flags to the platform-dependent loader. | |
| virtual bool | unload (const std::string &name) |
| Decrements the reference count on the given shared library. The library will only be unloaded once no more references to it exist. | |
| virtual bool | isLoaded (const std::string &name) const |
| virtual void * | getSymbol (const std::string &symbol) |
| Searches all shared libraries that are currently loaded for the given symbol. | |
| virtual std::string | getLastError () |
Protected Attributes | |
| SharedLibraryMap | m_map |
| Maps library names to reference counts and platform-dependent handles. | |
| SharedLibraryPlatform * | m_platform |
| Platform-dependent interface to low-level DSO routines. | |
Detailed Description
Definition at line 40 of file SharedLibraryManager.h.
Constructor & Destructor Documentation
| SharedLibraryManager::SharedLibraryManager | ( | SharedLibraryPlatform * | platform | ) | [inline] |
Definition at line 45 of file SharedLibraryManager.h.
| virtual SharedLibraryManager::~SharedLibraryManager | ( | ) | [inline, virtual] |
Definition at line 51 of file SharedLibraryManager.h.
Member Function Documentation
| SharedLibrary * SharedLibraryManager::load | ( | const std::string & | name, | |
| int | openFlags = 0 | |||
| ) | [virtual] |
Attempts to load/initialize the given shared library, optionally specifying the given open flags to the platform-dependent loader.
SharedLibraries are reference-counted, so if the specified library is already loaded, the a second copy of the wrapper SharedLibrary will be returned and the reference count will be incremented accordingly.
- Returns:
- a SharedLibrary wrapper on success or NULL on failure
Definition at line 15 of file SharedLibraryManager.cpp.
| bool SharedLibraryManager::unload | ( | const std::string & | name | ) | [virtual] |
Decrements the reference count on the given shared library. The library will only be unloaded once no more references to it exist.
- Returns:
- true on successful decrement, false otherwise
Definition at line 35 of file SharedLibraryManager.cpp.
| bool SharedLibraryManager::isLoaded | ( | const std::string & | name | ) | const [virtual] |
- Returns:
- whether or not the given library is currently loaded with respect to this manager.
Definition at line 46 of file SharedLibraryManager.cpp.
| void * SharedLibraryManager::getSymbol | ( | const std::string & | symbol | ) | [virtual] |
Searches all shared libraries that are currently loaded for the given symbol.
- Returns:
- the handle of the shared library containing the given symbol or NULL if the symbol could not be found
Definition at line 50 of file SharedLibraryManager.cpp.
| std::string SharedLibraryManager::getLastError | ( | ) | [virtual] |
- Returns:
- a human-readable string describing the last error which occurred within this SharedLibrary
Definition at line 64 of file SharedLibraryManager.cpp.
Member Data Documentation
SharedLibraryMap SharedLibraryManager::m_map [protected] |
Maps library names to reference counts and platform-dependent handles.
Definition at line 109 of file SharedLibraryManager.h.
SharedLibraryPlatform* SharedLibraryManager::m_platform [protected] |
Platform-dependent interface to low-level DSO routines.
Definition at line 112 of file SharedLibraryManager.h.
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6