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

Public Methods | |
~KLibLoader () | |
You should NEVER destruct an instance of KLibLoader until you know what you are doing. | |
KLibFactory * | factory (const char *libname) |
Loads and initializes a library. | |
virtual KLibrary * | library (const char *libname) |
Loads and initializes a library. | |
KLibrary * | globalLibrary (const char *name) |
Loads and initializes a library. | |
virtual void | unloadLibrary (const char *libname) |
Unloads the library with the given name. | |
Static Public Methods | |
KLibLoader * | self () |
Returns a pointer to the factory. | |
QString | findLibrary (const char *name, const KInstance *instance=KGlobal::instance()) |
Helper method which looks for a library in the standard paths ("module" and "lib" resources). |
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.
- Author:
- Torben Weis <weis@kde.org>
Definition at line 140 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 330 of file klibloader.cpp. References QAsciiDictIterator::current(). |
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 487 of file klibloader.cpp. References KLibrary::factory(), library(), and QObject::name(). |
|
Loads and initializes a library. Loading a library multiple times is handled gracefully.
Definition at line 407 of file klibloader.cpp. References QObject::connect(), QPtrListIterator::current(), QObject::destroyed(), findLibrary(), QString::fromLatin1(), QString::isEmpty(), QString::latin1(), and QObject::name(). 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 391 of file klibloader.cpp. References library(), and QObject::name(). |
|
Unloads the library with the given name.
Definition at line 470 of file klibloader.cpp. References QObject::destroyed(), and QObject::disconnect(). Referenced by KLibrary::unload(). |
|
Returns a pointer to the factory. Use this function to get an instance of KLibLoader.
Definition at line 300 of file klibloader.cpp. Referenced by findLibrary(), and KLibrary::unload(). |
|
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 348 of file klibloader.cpp. References d, KInstance::dirs(), QCString::find(), KStandardDirs::findResource(), QCString::findRev(), KNotifyClient::instance(), QString::isEmpty(), QCString::left(), QObject::name(), and self(). Referenced by library(). |
The documentation for this class was generated from the following files: