|
|
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.
~KLibLoader () |
You should NEVER destruct an instance of KLibLoader until you know what you are doing. This will release the loaded library.
KLibFactory* factory ( const char* libname ) |
Loads and initializes a library. Loading a library multiple times is handled gracefully.
This is a convenience function that returns the factory immediately
KLibrary* library ( const char* libname ) |
Loads and initializes a library. Loading a library multiple times is handled gracefully.
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. |
KLibLoader* self () |
Returns: a pointer to the loader. If no loader exists until now then one is created.