An encapsulation of a dynamically loadable module, such as a shared library or object file on UNIX systems or a DLL on Windows. More...
#include <LoadableModule.h++>

Public Member Functions | |
| LoadableModule (const String &path=String::null) | |
| Construct a LoadableModule for the loadable object specified by the given path. | |
| ~LoadableModule () throw () | |
| Destructor. | |
| void | open () throw (IOException) |
| Open the loadable object file. | |
| void | close () throw () |
| Close the loadable object file. | |
| bool | isOpen () const throw () |
| Determine if the object file has been opened. | |
| void * | lookup (const char *symbol) throw () |
| Look up a symbol within the loadable object. | |
| void * | lookup (const String &symbol) throw () |
| Look up a symbol within the loadable object. | |
| void * | operator[] (const char *symbol) throw () |
| Look up a symbol within the loadable object. | |
| void * | operator[] (const String &symbol) throw () |
| Look up a symbol within the loadable object. | |
| void | setPath (const String &path) throw () |
| Set the object file path. | |
| String | getPath () const throw () |
| Get the object file path. | |
Static Public Member Functions | |
| static String | getExtension () throw () |
| Get the filename extension for loadable objects (shared libraries) on the host system. | |
| static String | getPrefix () throw () |
| Get the filename prefix for loadable objects (shared libraries) on the host system. | |
| static String | fileNameForStem (const String &stem) throw () |
| Construct a complete filename for a loadable module stem based on the conventions of the host system. | |
| static String | fileNameForStem (const String &stem, const Version &version) throw () |
| Construct a complete filename for a shared library stem and version based on the conventions of the host system. | |
| static bool | isLoadableModuleFile (const String &fileName) throw () |
| Test a filename to determine if it matches the naming convention for shared libraries on the host system. | |
An encapsulation of a dynamically loadable module, such as a shared library or object file on UNIX systems or a DLL on Windows.
| LoadableModule | ( | const String & | path = String::null |
) |
Construct a LoadableModule for the loadable object specified by the given path.
| path | The path to the object file. |
| ~LoadableModule | ( | ) | throw () |
Destructor.
Closes the object file.
| void close | ( | ) | throw () |
Close the loadable object file.
Construct a complete filename for a shared library stem and version based on the conventions of the host system.
For example, a stem of "foo" and version of "9:0:6" produces "foo-3.dll" on Windows, "libfoo.3.6.0.so" on Mac OS X, and "libfoo.so.3.6.0" on all other (POSIX) systems. (Note that a loadable module on Mac OS X may also have the extension ".bundle", though ".so" is more commonly used.)
| stem | The stem. | |
| version | The version. |
Construct a complete filename for a loadable module stem based on the conventions of the host system.
For example, "foo" produces "foo.dll" on Windows, and "libfoo.so" on Mac OS X and all other (POSIX) systems.
| stem | The stem. |
| String getExtension | ( | ) | throw () [static] |
Get the filename extension for loadable objects (shared libraries) on the host system.
This returns "dll" on Windows, "so" on Mac OS X, and "so" on all other (POSIX) systems.
| String getPath | ( | ) | const throw () [inline] |
Get the object file path.
| String getPrefix | ( | ) | throw () [static] |
Get the filename prefix for loadable objects (shared libraries) on the host system.
This returns "lib" on POSIX systems (including Mac OS X) and an empty string on Windows.
| bool isLoadableModuleFile | ( | const String & | fileName | ) | throw () [static] |
Test a filename to determine if it matches the naming convention for shared libraries on the host system.
| fileName | The filename to test. |
| bool isOpen | ( | ) | const throw () [inline] |
Determine if the object file has been opened.
| void* lookup | ( | const String & | symbol | ) | throw () [inline] |
Look up a symbol within the loadable object.
| symbol | The symbol to look up. |
| void * lookup | ( | const char * | symbol | ) | throw () |
Look up a symbol within the loadable object.
| symbol | The symbol to look up. |
| void open | ( | ) | throw (IOException) |
Open the loadable object file.
| IOException | If the object could not be loaded, or if no path has been specified. |
| void* operator[] | ( | const String & | symbol | ) | throw () [inline] |
Look up a symbol within the loadable object.
| symbol | The symbol to look up. |
| void* operator[] | ( | const char * | symbol | ) | throw () [inline] |
Look up a symbol within the loadable object.
| symbol | The symbol to look up. |
| void setPath | ( | const String & | path | ) | throw () [inline] |
Set the object file path.
If the object file is open, the call has no effect.
1.6.3