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 () | |
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. | |
QString | lastErrorMessage () const |
virtual void | unloadLibrary (const char *libname) |
Unloads the library with the given name. | |
Static Public Member Functions | |
KLibLoader * | self () |
Returns a pointer to the factory. | |
void | cleanUp () |
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). | |
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.
- 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 319 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 476 of file klibloader.cpp. References KLibrary::factory(), library(), and KStdAction::name(). |
|
Loads and initializes a library. Loading a library multiple times is handled gracefully.
Definition at line 396 of file klibloader.cpp. References QObject::connect(), QPtrListIterator::current(), QObject::destroyed(), findLibrary(), QString::fromLatin1(), QString::isEmpty(), QString::latin1(), and KStdAction::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 380 of file klibloader.cpp. References library(), and KStdAction::name(). |
|
Unloads the library with the given name.
Definition at line 459 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 289 of file klibloader.cpp. Referenced by findLibrary(). |
|
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 337 of file klibloader.cpp. References QString::arg(), d, KInstance::dirs(), QCString::find(), KStandardDirs::findResource(), QCString::findRev(), KNotifyClient::instance(), QString::isEmpty(), KStdAction::name(), and self(). Referenced by library(). |
The documentation for this class was generated from the following files: