• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

console/kabcclient

Public Member Functions | List of all members
FormatFactory Class Reference

#include <formatfactory.h>

Public Member Functions

 FormatFactory ()
 
 ~FormatFactory ()
 
InputFormat * inputFormat (const QByteArray &name)
 
QByteArrayList inputFormatList () const
 
OutputFormat * outputFormat (const QByteArray &name)
 
QByteArrayList outputFormatList () const
 

Detailed Description

Factory for input parsers and output formatters.

The factory can be queried for the InputFormat and OutputFormat implementations it knows and can create.

Example: displaying all format names and their respective description

FormatFactory factory;
QByteArrayList inputFormats = factory.inputFormatList();
QByteArrayList::const_iterator it = inputFormats.being();
for (; it != inputFormats.end(); ++it)
{
InputFormat* inputFormat = factory.inputFormat(*it);
cout << *it << endl;
cout << inputFormat->description().local8Bit() << endl;
delete inputFormat;
}
QByteArrayList outputFormats = factory.outputFormatList();
it = outputFormats.being();
for (; it != outputFormats.end(); ++it)
{
OutputFormat* outputFormat = factory.outputFormat(*it);
cout << *it << endl;
cout << outputFormat->description().local8Bit() << endl;
delete outputFormat;
}
Author
Kevin Krammer, kevin.nosp@m..kra.nosp@m.mmer@.nosp@m.gmx..nosp@m.at
See also
InputFormat
OutputFormat

Definition at line 102 of file formatfactory.h.

Constructor & Destructor Documentation

FormatFactory::FormatFactory ( )

Creates and initializes the factory.

Definition at line 27 of file formatfactory.cpp.

FormatFactory::~FormatFactory ( )

Destroys the factory and its internal data.

Definition at line 46 of file formatfactory.cpp.

Member Function Documentation

InputFormat * FormatFactory::inputFormat ( const QByteArray &  name)

Creates an InputFormat instance for the given name.

Warning
Every call creates a new instance and the caller gains its ownership, i.e. has to delete it when it isn't used any longer.
Parameters
namethe input format name, as taken from the commandline
Returns
a new InputFormat instance of the input parser associated with the given name or 0 if the name is unknown to the factory
See also
inputFormatList()
InputFormat
outputFormat

Definition at line 53 of file formatfactory.cpp.

QByteArrayList FormatFactory::inputFormatList ( ) const
inline

Returns a list of input parser names.

Each list entry is a simple string that can be used to identify the parser on the commandline. The factory method inputFormat() will check for exactly those strings.

Returns
a list of input parser names
See also
inputFormat()
InputFormat
outputFormatList()

Definition at line 128 of file formatfactory.h.

OutputFormat * FormatFactory::outputFormat ( const QByteArray &  name)

Creates an OutputFormat instance for the given name.

Warning
Every call creates a new instance and the caller gains its ownership, i.e. has to delete it when it isn't used any longer.
Parameters
namethe output format name, as taken from the commandline
Returns
a new OutputFormat instance of the output formatter associated with the given name or 0 if the name is unknown to the factory
See also
inputFormatList()
InputFormat
outputFormat

Definition at line 81 of file formatfactory.cpp.

QByteArrayList FormatFactory::outputFormatList ( ) const
inline

Returns a list of output formatter names.

Each list entry is a simple string that can be used to identify the formatter on the commandline. The factory method outputFormat() will check for exactly those strings.

Returns
a list of output formatter names
See also
outputFormat()
OutputFormat
inputFormatList()

Definition at line 143 of file formatfactory.h.


The documentation for this class was generated from the following files:
  • formatfactory.h
  • formatfactory.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

console/kabcclient

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal