Main Page Modules Class Hierarchy Compound List Compound Members
GAUGE3D::GLibrary Class Reference
Loads shared libraries (dll's and so's).
More...
#include <gauge3d/osabstraction/library.h>
Inherits GAUGE3D::GObject.
List of all members.
Detailed Description
Loads shared libraries (dll's and so's).
This class allows you to load executable add-ons to your program. You could use it directly, but we recommend using GObjectLoader instead, as it provides a much nicer system for doing this. GObjectLoader uses GLibrary to do what it does.
Constructor & Destructor Documentation
GAUGE3D::GLibrary::GLibrary (
|
GString filename )
|
|
|
Create a GLibrary for a given library file.
-
Parameters:
-
filename
|
The path and name of the library file on the disk. If no path is given (just a filename), the system's standard library directories will be searched. |
-
Remarks:
-
The library can be closed when not in use and re-openned later, but the filename will never change. This way, the library implementation can opt to keep the libraries open when in debug mode in case the debugger is easily confused (most are! even GDB!).
|
Member Function Documentation
bool GAUGE3D::GLibrary::Open (
|
)
|
|
|
Open the library.
-
Returns:
-
True if the library was successfully opened, or false if an error occured.
-
Remarks:
-
Don't forget that if you close and re-open a library, you have to get all your symbols again. They will not be the same.
|
void * GAUGE3D::GLibrary::GetSymbol (
|
GString symbolName )
|
|
|
Get a pointer to a function in the library.
-
Parameters:
-
symbolName
|
The name of the function to get a pointer to. |
-
Returns:
-
A pointer to the function, or NULL if an error occured or the function was not found.
-
Remarks:
-
Most operating systems allow you to get symbols other than functions from a library. Do not depend on this behavior.
|
void GAUGE3D::GLibrary::Close (
|
)
|
|
|
Unload the library from memory.
This will unload the library from RAM. If you need to use it again, call Open(). |
The documentation for this class was generated from the following file:
- gauge3d/osabstraction/library.h
Generated at Tue Jan 30 17:07:34 2001 for gauge3d by
1.2.4 written by Dimitri van Heesch,
© 1997-2000