• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions | Friends | List of all members
KLibrary Class Reference

#include <klibloader.h>

Inherits TQObject.

Public Member Functions

 KLibrary (const TQString &libname, const TQString &filename, void *handle)
 
TQString name () const
 
TQString fileName () const
 
KLibFactory * factory ()
 
void * symbol (const char *name) const
 
bool hasSymbol (const char *name) const
 
void unload () const
 

Friends

class KLibLoader
 
class TQAsciiDict< KLibrary >
 

Detailed Description

Represents a dynamically loaded library.

KLibrary allows you to look up symbols of the shared library. Use KLibLoader to create a new instance of KLibrary.

See also
KLibLoader
Author
Torben Weis weis@.nosp@m.kde..nosp@m.org

Definition at line 50 of file klibloader.h.

Constructor & Destructor Documentation

◆ KLibrary()

KLibrary::KLibrary ( const TQString &  libname,
const TQString &  filename,
void *  handle 
)

Don't create KLibrary objects on your own.

Instead use KLibLoader.

Definition at line 100 of file klibloader.cpp.

Member Function Documentation

◆ factory()

KLibFactory * KLibrary::factory ( )

Returns the factory of the library.

Returns
The factory of the library if there is any, otherwise 0

Definition at line 148 of file klibloader.cpp.

◆ fileName()

TQString KLibrary::fileName ( ) const

Returns the file name of the library.

Returns
The filename of the library, for example "/opt/kde2&/lib/libkspread.la"

Definition at line 143 of file klibloader.cpp.

◆ hasSymbol()

bool KLibrary::hasSymbol ( const char *  name) const

Looks up a symbol from the library.

This is a very low level function that you usually don't want to use. Unlike symbol(), this method doesn't warn if the symbol doesn't exist, so if the symbol might or might not exist, better use hasSymbol() before symbol().

Parameters
namethe name of the symbol to check
Returns
true if the symbol exists
Since
3.1

Definition at line 194 of file klibloader.cpp.

◆ name()

TQString KLibrary::name ( ) const

Returns the name of the library.

Returns
The name of the library like "libkspread".

Definition at line 138 of file klibloader.cpp.

◆ symbol()

void * KLibrary::symbol ( const char *  name) const

Looks up a symbol from the library.

This is a very low level function that you usually don't want to use. Usually you should check using hasSymbol() whether the symbol actually exists, otherwise a warning will be printed.

Parameters
namethe name of the symbol to look up
Returns
the address of the symbol, or 0 if it does not exist
See also
hasSymbol

Definition at line 181 of file klibloader.cpp.

◆ unload()

void KLibrary::unload ( ) const

Unloads the library.

This typically results in the deletion of this object. You should not reference its pointer after calling this function.

Definition at line 200 of file klibloader.cpp.

Friends And Related Function Documentation

◆ KLibLoader

friend class KLibLoader
friend

Definition at line 52 of file klibloader.h.

◆ TQAsciiDict< KLibrary >

friend class TQAsciiDict< KLibrary >
friend

Definition at line 52 of file klibloader.h.


The documentation for this class was generated from the following files:
  • klibloader.h
  • klibloader.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.