KLibLoader Class Reference
The KLibLoader allows you to load libraries dynamically at runtime. More...
#include <klibloader.h>
Inheritance diagram for KLibLoader:


Public Member Functions | |
~KLibLoader () | |
KLibFactory * | factory (const char *libname) |
virtual KLibrary * | library (const char *libname) |
KLibrary * | globalLibrary (const char *name) |
QString | lastErrorMessage () const |
virtual void | unloadLibrary (const char *libname) |
Static Public Member Functions | |
static KLibLoader * | self () |
static void | cleanUp () |
static QString | findLibrary (const char *name, const KInstance *instance=KGlobal::instance()) |
Protected Member Functions | |
KLibLoader (QObject *parent=0, const char *name=0) | |
virtual void | virtual_hook (int id, void *data) |
Friends | |
class | KLibrary |
Detailed Description
The KLibLoader allows you to load libraries dynamically at runtime.Dependent libraries are loaded automatically.
KLibLoader follows the singleton pattern. You can not create multiple instances. Use self() to get a pointer to the loader.
- See also:
- KLibrary
- Author:
- Torben Weis <weis@kde.org>
Definition at line 142 of file klibloader.h.
Constructor & Destructor Documentation
|
You should NEVER destruct an instance of KLibLoader until you know what you are doing. This will release the loaded libraries. Definition at line 316 of file klibloader.cpp. References QAsciiDictIterator::current(), and kdDebug(). |
Member Function Documentation
|
Loads and initializes a library. Loading a library multiple times is handled gracefully. This is a convenience function that returns the factory immediately
Definition at line 476 of file klibloader.cpp. References KLibrary::factory(), and library(). |
|
Loads and initializes a library. Loading a library multiple times is handled gracefully.
Definition at line 390 of file klibloader.cpp. References QString::arg(), QObject::connect(), QPtrListIterator::current(), QObject::destroyed(), QFile::encodeName(), findLibrary(), QString::fromLatin1(), i18n(), QAsciiDict::insert(), QString::isEmpty(), kdDebug(), and KLibrary. Referenced by factory(), and globalLibrary(). |
|
Loads and initializes a library. Loading a library multiple times is handled gracefully. The library is loaded such that the symbols are globally accessible so libraries with dependencies can be loaded sequentially.
Definition at line 374 of file klibloader.cpp. |
|
Unloads the library with the given name.
Definition at line 459 of file klibloader.cpp. References QObject::destroyed(), QObject::disconnect(), and QAsciiDict::remove(). Referenced by KLibrary::unload(). |
|
Returns a pointer to the factory. Use this function to get an instance of KLibLoader.
Definition at line 286 of file klibloader.cpp. Referenced by KLibrary::factory(), KLibrary::KLibrary(), and KLibrary::symbol(). |
|
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.
Definition at line 349 of file klibloader.cpp. References QFile::decodeName(), KInstance::dirs(), KStandardDirs::findResource(), QString::isEmpty(), QDir::isRelativePath(), and kdDebug(). Referenced by library(). |
The documentation for this class was generated from the following files: