\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=44pt]{classKLibrary__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KLibrary:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=203pt]{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)
\item 
{\bf QString} {\bf name} () const 
\item 
{\bf QString} {\bf file\-Name} () const 
\item 
{\bf KLib\-Factory} $\ast$ {\bf factory} ()
\item 
void $\ast$ {\bf symbol} (const char $\ast$name) const 
\item 
bool {\bf has\-Symbol} (const char $\ast$name) const 
\item 
void {\bf unload} () const 
\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. Use {\bf KLib\-Loader}{\rm (p.\,\pageref{classKLibLoader})} to create a new instance of KLibrary.

\begin{Desc}
\item[See also:]{\bf KLib\-Loader}{\rm (p.\,\pageref{classKLibLoader})} \end{Desc}
\begin{Desc}
\item[Author:]Torben Weis $<${\tt weis@kde.org}$>$ \end{Desc}




Definition at line 50 of file klibloader.h.

\subsection{Constructor \& Destructor Documentation}
\index{KLibrary@{KLibrary}!KLibrary@{KLibrary}}
\index{KLibrary@{KLibrary}!KLibrary@{KLibrary}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KLibrary::KLibrary (const {\bf QString} \& {\em libname}, const {\bf QString} \& {\em filename}, void $\ast$ {\em handle})}\label{classKLibrary_a0}


Don't create KLibrary objects on your own. 

Instead use {\bf KLib\-Loader}{\rm (p.\,\pageref{classKLibLoader})}. 

Definition at line 98 of file klibloader.cpp.

References KLib\-Loader::self().

\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 136 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 141 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 146 of file klibloader.cpp.

References QString::arg(), QObject::connect(), KLib\-Loader::d, endl(), name(), KLib\-Loader::self(), 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 179 of file klibloader.cpp.

References KLib\-Loader::d, endl(), QString::from\-Latin1(), and KLib\-Loader::self().

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

References 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}
