\section{KLibrary Class Reference}
\label{classKLibrary}\index{KLibrary@{KLibrary}}
Represents a dynamically loaded library.  


{\tt \#include $<$klibloader.h$>$}

Inheritance diagram for KLibrary:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=46pt]{classKLibrary__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KLibrary:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=234pt]{classKLibrary__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KLibrary} (const  {\bf QString} \&libname, const  {\bf QString} \&filename, void $\ast$handle)\label{classKLibrary_a0}

\item 
{\bf QString} {\bf name} () const 
\begin{CompactList}\small\item\em Returns the name of the library. \item\end{CompactList}\item 
{\bf QString} {\bf file\-Name} () const 
\begin{CompactList}\small\item\em Returns the file name of the library. \item\end{CompactList}\item 
{\bf KLib\-Factory} $\ast$ {\bf factory} ()
\begin{CompactList}\small\item\em Returns the factory of the library. \item\end{CompactList}\item 
void $\ast$ {\bf symbol} (const  char $\ast$name) const 
\begin{CompactList}\small\item\em Looks up a symbol from the library. \item\end{CompactList}\item 
bool {\bf has\-Symbol} (const  char $\ast$name) const 
\begin{CompactList}\small\item\em Looks up a symbol from the library. \item\end{CompactList}\item 
void {\bf unload} () const 
\begin{CompactList}\small\item\em Unloads the library. \item\end{CompactList}\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KLib\-Loader}\label{classKLibrary_n0}

\item 
class {\bf QAscii\-Dict$<$ KLibrary $>$}\label{classKLibrary_n1}

\end{CompactItemize}


\subsection{Detailed Description}
Represents a dynamically loaded library. 

KLibrary allows you to look up symbols of the shared library.

\begin{Desc}
\item[Author:]Torben Weis $<${\tt weis@kde.org}$>$ \end{Desc}




Definition at line 48 of file klibloader.h.

\subsection{Member Function Documentation}
\index{KLibrary@{KLibrary}!name@{name}}
\index{name@{name}!KLibrary@{KLibrary}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLibrary::name () const}\label{classKLibrary_a1}


Returns the name of the library. 

\begin{Desc}
\item[Returns:]The name of the library like \char`\"{}libkspread\char`\"{}. \end{Desc}


Reimplemented from {\bf QObject}.

Definition at line 130 of file klibloader.cpp.

Referenced by factory(), and unload().\index{KLibrary@{KLibrary}!fileName@{fileName}}
\index{fileName@{fileName}!KLibrary@{KLibrary}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLibrary::file\-Name () const}\label{classKLibrary_a2}


Returns the file name of the library. 

\begin{Desc}
\item[Returns:]The filename of the library, for example \char`\"{}/opt/kde2\&/lib/libkspread.la\char`\"{} \end{Desc}


Definition at line 135 of file klibloader.cpp.\index{KLibrary@{KLibrary}!factory@{factory}}
\index{factory@{factory}!KLibrary@{KLibrary}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLib\-Factory} $\ast$ KLibrary::factory ()}\label{classKLibrary_a3}


Returns the factory of the library. 

\begin{Desc}
\item[Returns:]The factory of the library if there is any, otherwise 0 \end{Desc}


Definition at line 140 of file klibloader.cpp.

References QObject::connect(), name(), QCString::sprintf(), and symbol().

Referenced by KLib\-Loader::factory().\index{KLibrary@{KLibrary}!symbol@{symbol}}
\index{symbol@{symbol}!KLibrary@{KLibrary}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ KLibrary::symbol (const char $\ast$ {\em name}) const}\label{classKLibrary_a4}


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 {\bf has\-Symbol}{\rm (p.\,\pageref{classKLibrary_a5})}() whether the symbol actually exists, otherwise a warning will be printed. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the name of the symbol to look up \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the address of the symbol, or 0 if it does not exist \end{Desc}
\begin{Desc}
\item[See also:]{\bf has\-Symbol}{\rm (p.\,\pageref{classKLibrary_a5})} \end{Desc}


Definition at line 171 of file klibloader.cpp.

Referenced by factory().\index{KLibrary@{KLibrary}!hasSymbol@{hasSymbol}}
\index{hasSymbol@{hasSymbol}!KLibrary@{KLibrary}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KLibrary::has\-Symbol (const char $\ast$ {\em name}) const}\label{classKLibrary_a5}


Looks up a symbol from the library. 

This is a very low level function that you usually don't want to use. Unlike {\bf symbol}{\rm (p.\,\pageref{classKLibrary_a4})}(), this method doesn't warn if the symbol doesn't exist, so if the symbol might or might not exist, better use {\bf has\-Symbol()}{\rm (p.\,\pageref{classKLibrary_a5})} before {\bf symbol()}{\rm (p.\,\pageref{classKLibrary_a4})}. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the name of the symbol to check \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the symbol exists \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 183 of file klibloader.cpp.\index{KLibrary@{KLibrary}!unload@{unload}}
\index{unload@{unload}!KLibrary@{KLibrary}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLibrary::unload () const}\label{classKLibrary_a6}


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 189 of file klibloader.cpp.

References QFile::encode\-Name(), name(), and KLib\-Loader::unload\-Library().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
klibloader.h\item 
klibloader.cpp\end{CompactItemize}
