# kabc Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KABC::FormatFactory Class Reference

Class for loading format plugins. More...

`#include <formatfactory.h>`

Collaboration diagram for KABC::FormatFactory:

[legend]
List of all members.

## Public Member Functions

FormatPlugin * | format (const QString &type)
| Returns a pointer to a format object or a null pointer if format type doesn't exist.
QStringList | formats ()
| Returns a list of all available format types.
FormatInfo * | info (const QString &type)
| Returns the info structure for a special type.

## Static Public Member Functions

FormatFactory * | self ()
| Returns the global format factory.

## Detailed Description

Class for loading format plugins.

Example:

     KABC::FormatFactory *factory = KABC::FormatFactory::self();

     QStringList list = factory->formats();
     QStringList::Iterator it;
     for ( it = list.begin(); it != list.end(); ++it ) {
       KABC::FormatPlugin *format = factory->format( (*it) );
       // do something with format
     }

Definition at line 57 of file formatfactory.h.

## Member Function Documentation

FormatFactory * FormatFactory::self | ( |  | ) | `[static]`

| Returns the global format factory. Definition at line 36 of file formatfactory.cpp.

FormatPlugin * FormatFactory::format | ( | const QString & | type | ) |

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

Parameters:

  type | The type of the format, returned by formats()

Definition at line 108 of file formatfactory.cpp.

References format(), QString::isEmpty(), and KLibrary::symbol().

Referenced by format(), and KABC::ResourceIMAP::ResourceIMAP().

QStringList FormatFactory::formats | ( |  | ) |

| Returns a list of all available format types. Definition at line 85 of file formatfactory.cpp. References QDictIterator::current(), and QDictIterator::currentKey().

FormatInfo * FormatFactory::info | ( | const QString & | type | ) |

| Returns the info structure for a special type. Definition at line 100 of file formatfactory.cpp. References QString::isEmpty().

The documentation for this class was generated from the following files:

- formatfactory.h
- formatfactory.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:44 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001