Working with dynamic libraries, mostly resolving symbols.
More...
#include <libppbase/base/DynamicLibrary.h>
List of all members.
Public Types |
typedef void(* | func )() |
| return type for resolvef
|
Public Member Functions |
| DynamicLibrary () |
| Constructor.
|
| ~DynamicLibrary () |
| Destructor, closes the library.
|
void | close () |
| Closes the library.
|
const String & | getFileName () const |
| Gets the file name of the open library.
|
bool | isOpen () const |
| Checks if the library is open.
|
void | open (const char *fname, bool rsvall=true, bool global=false) |
| Opens the library.
|
void | open (const String &fname, bool rsvall=true, bool global=false) |
| Opens the library.
|
void * | resolve (const char *name) const |
| Gets the address of an object in the library.
|
void * | resolve (const String &name) const |
| Gets the address of an object in the library.
|
func | resolvef (const char *name) const |
| Gets the address of a function in the library.
|
func | resolvef (const String &name) const |
| Gets the address of a function in the library.
|
Detailed Description
Working with dynamic libraries, mostly resolving symbols.
- Author:
- Christoph Schwarz
- Version:
- $Id: DynamicLibrary.h 21 2010-09-05 04:18:17Z cschwarz1 $
Member Function Documentation
const String& base::DynamicLibrary::getFileName |
( |
|
) |
const |
Gets the file name of the open library.
- Returns:
- empty string if there is no open library
bool base::DynamicLibrary::isOpen |
( |
|
) |
const |
Checks if the library is open.
- Returns:
- true if it is open, false if not
void base::DynamicLibrary::open |
( |
const char * |
fname, |
|
|
bool |
rsvall = true , |
|
|
bool |
global = false | |
|
) |
| | |
Opens the library.
- Parameters:
-
| fname | file name of the dynamic library |
| rsvall | flag: resolve all external references in the library |
| global | flag: make all symbols available to subsequently loaded libraries |
void base::DynamicLibrary::open |
( |
const String & |
fname, |
|
|
bool |
rsvall = true , |
|
|
bool |
global = false | |
|
) |
| | |
Opens the library.
- Parameters:
-
| fname | file name of the dynamic library |
| rsvall | flag: resolve all external references in the library |
| global | flag: make all symbols available to subsequently loaded libraries |
void* base::DynamicLibrary::resolve |
( |
const String & |
name |
) |
const |
Gets the address of an object in the library.
- Parameters:
-
- Returns:
- the object address
-
NULL if the object does not exist
void* base::DynamicLibrary::resolve |
( |
const char * |
name |
) |
const |
Gets the address of an object in the library.
- Parameters:
-
- Returns:
- the object address
-
NULL if the object does not exist
func base::DynamicLibrary::resolvef |
( |
const String & |
name |
) |
const |
Gets the address of a function in the library.
- Parameters:
-
- Returns:
- the object address
-
NULL if the object does not exist
func base::DynamicLibrary::resolvef |
( |
const char * |
name |
) |
const |
Gets the address of a function in the library.
- Parameters:
-
- Returns:
- the object address
-
NULL if the object does not exist
The documentation for this class was generated from the following file: