\section{KABC::Format\-Factory Class Reference}
\label{classKABC_1_1FormatFactory}\index{KABC::FormatFactory@{KABC::FormatFactory}}
Class for loading format plugins.  


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

Collaboration diagram for KABC::Format\-Factory:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=107pt]{classKABC_1_1FormatFactory__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Format\-Plugin} $\ast$ {\bf format} (const  {\bf QString} \&type)
\begin{CompactList}\small\item\em Returns a pointer to a format object or a null pointer if format type doesn't exist. \item\end{CompactList}\item 
{\bf QString\-List} {\bf formats} ()
\begin{CompactList}\small\item\em Returns a list of all available format types. \item\end{CompactList}\item 
Format\-Info $\ast$ {\bf info} (const  {\bf QString} \&type)
\begin{CompactList}\small\item\em Returns the info structure for a special type. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Format\-Factory} $\ast$ {\bf self} ()
\begin{CompactList}\small\item\em Returns the global format factory. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Class for loading format plugins. 

Example:

\small\begin{alltt}
 KABC::FormatFactory *factory = {\bf KABC::FormatFactory::self()}{\rm (p.\,\pageref{classKABC_1_1FormatFactory_e0})};\end{alltt}\normalsize 


\small\begin{alltt} {\bf QStringList} list = factory-$>${\bf formats()}{\rm (p.\,\pageref{classKABC_1_1FormatFactory_a1})};
 QStringList::Iterator it;
 for ( it = list.begin(); it != list.end(); ++it ) \{
   {\bf KABC::FormatPlugin}{\rm (p.\,\pageref{classKABC_1_1FormatPlugin})} *format = factory-$>$format( (*it) );
   // do something with format
 \}
 \end{alltt}\normalsize 
 



Definition at line 57 of file formatfactory.h.

\subsection{Member Function Documentation}
\index{KABC::FormatFactory@{KABC::Format\-Factory}!self@{self}}
\index{self@{self}!KABC::FormatFactory@{KABC::Format\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Format\-Factory} $\ast$ Format\-Factory::self ()\hspace{0.3cm}{\tt  [static]}}\label{classKABC_1_1FormatFactory_e0}


Returns the global format factory. 



Definition at line 36 of file formatfactory.cpp.\index{KABC::FormatFactory@{KABC::Format\-Factory}!format@{format}}
\index{format@{format}!KABC::FormatFactory@{KABC::Format\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Format\-Plugin} $\ast$ Format\-Factory::format (const {\bf QString} \& {\em type})}\label{classKABC_1_1FormatFactory_a0}


Returns a pointer to a format object or a null pointer if format type doesn't exist. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]The type of the format, returned by {\bf formats}{\rm (p.\,\pageref{classKABC_1_1FormatFactory_a1})}() \end{description}
\end{Desc}


Definition at line 108 of file formatfactory.cpp.

References format(), QString::is\-Empty(), and KLibrary::symbol().

Referenced by format(), and KABC::Resource\-IMAP::Resource\-IMAP().\index{KABC::FormatFactory@{KABC::Format\-Factory}!formats@{formats}}
\index{formats@{formats}!KABC::FormatFactory@{KABC::Format\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} Format\-Factory::formats ()}\label{classKABC_1_1FormatFactory_a1}


Returns a list of all available format types. 



Definition at line 85 of file formatfactory.cpp.

References QDict\-Iterator::current(), and QDict\-Iterator::current\-Key().\index{KABC::FormatFactory@{KABC::Format\-Factory}!info@{info}}
\index{info@{info}!KABC::FormatFactory@{KABC::Format\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Format\-Info $\ast$ Format\-Factory::info (const {\bf QString} \& {\em type})}\label{classKABC_1_1FormatFactory_a2}


Returns the info structure for a special type. 



Definition at line 100 of file formatfactory.cpp.

References QString::is\-Empty().

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