KDE PIM / Developers / API Docs / libkmime

KMime::HeaderFactory Class Reference

This is a factory for KMime::Headers. Factory for KMime::Headers. More...

#include <kmime_headers.h>

Inherits QAsciiDict.

List of all members.

Static Public Member Functions


Detailed Description

This is a factory for KMime::Headers. Factory for KMime::Headers.

You can create new header objects by type with create and upgrade an existing Headers::Generic to a specialized header object.

If you are a header class author, you can register your class (let's call it Foo) so:

    

Author:
Marc Mutz <mutz@kde.org>
See also:
KMime::Headers::Base KMime::Headers::Generic


Member Function Documentation

static Headers::Base* KMime::HeaderFactory::create const char *  aType  )  [inline, static]
 

Create a new header object of type aType, or a fitting generic substitute, if available and known.

static Headers::Base* KMime::HeaderFactory::create const QCString &  aType  )  [inline, static]
 

This is a wrapper around the above function, provided for convenience.

It differs from the above only in what arguments it takes.

static Headers::Base* KMime::HeaderFactory::upgrade Headers::Generic aType  )  [inline, static]
 

Consume aType and build a header object that corresponds to the type that aType->type() returns.

Parameters:
aType generic header to upgrade. This will be deleted if necessary, so don't use references to it after calling this function.
Returns:
A corresponding header object (if available), or a generic object for this kind of header (if known), or aType (else).
See also:
Headers::Generic create

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