|
|
The KLibLoader allows you to load libraries dynamically at runtime. Dependend libraries are loaded automatically.
KLibLoader follows the singleton pattern. You can not create multiple instances. Use self() to get a pointer to the loader.
|
You should NEVER destruct an instance of KLibLoader until you know what you are doing. This will release the loaded libraries.
KLibFactory* |
Loads and initializes a library. Loading a library multiple times is handled gracefully.
This is a convenience function that returns the factory immediately
See also: library
KLibrary* |
[virtual]
Loads and initializes a library. Loading a library multiple times is handled gracefully.
You can, however, give a library name ending in ".so" (or whatever is used on your platform), and the library will be loaded without resolving dependencies. USE WITH CARE :)
Parameters:
libname | This is the library name without extension. Usually that is something like "libkspread". The function will then search for a file named "libkspread.la" in the KDE library paths. The *.la files are created by libtool and contain important information especially about the libraries dependencies on other shared libs. Loading a "libfoo.so" could not solve the dependencies problem. |
Returns: KLibrariy is invalid (0) when the library couldn't be dlopened. in such a case you can retrieve the error message by calling KLibLoader::lastErrorMessage()
See also: factory
QString |
[const]
void |
[virtual]
KLibLoader* |
[static]
Returns: a pointer to the loader. If no loader exists until now then one is created.
void |
[static]
This is what makes it possible to rely on ~KLibFactory being called in all cases, whether the library is unloaded while the application is running or when exiting.
QString |
[static]
Helper method which looks for a library in the standard paths ("module" and "lib" resources) Made public for code that doesn't use KLibLoader itself, but still wants to open modules.
|
[protected: ]