TQTextCodecPlugin Class

Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# TQTextCodecPlugin Class Reference

The TQTextCodecPlugin class provides an abstract base for custom TQTextCodec plugins. More...

All the functions in this class are reentrant when TQt is built with thread support.

`#include <tqtextcodecplugin.h>`

List of all member functions.

## Public Members

- TQTextCodecPlugin ()
- ~TQTextCodecPlugin ()
- virtual TQStringList names () const = 0
- virtual TQTextCodec * createForName ( const TQString & name ) = 0
- virtual TQValueList<int> mibEnums () const = 0
- virtual TQTextCodec * createForMib ( int mib ) = 0

## Detailed Description

The TQTextCodecPlugin class provides an abstract base for custom TQTextCodec plugins.

The text codec plugin is a simple plugin interface that makes it easy to create custom text codecs that can be loaded dynamically into applications.

Writing a text codec plugin is achieved by subclassing this base class, reimplementing the pure virtual functions names(), createForName(), mibEnums() and createForMib(), and exporting the class with the `TQ_EXPORT_PLUGIN` macro. See the TQt Plugins documentation for details.

See the IANA character-sets encoding file for more information on mime names and mib enums.

See also Plugins.

## Member Function Documentation

### TQTextCodecPlugin::TQTextCodecPlugin ()

Constructs a text codec plugin. This is invoked automatically by the `TQ_EXPORT_PLUGIN` macro.

### TQTextCodecPlugin::~TQTextCodecPlugin ()

Destroys the text codec plugin.

You never have to call this explicitly. TQt destroys a plugin automatically when it is no longer used.

### TQTextCodec * TQTextCodecPlugin::createForMib ( int mib )`[pure virtual]`

Creates a TQTextCodec object for the mib enum mib.

(See the IANA character-sets encoding file for more information)

See also mibEnums().

### TQTextCodec * TQTextCodecPlugin::createForName ( const TQString & name )`[pure virtual]`

Creates a TQTextCodec object for the codec called name.

See also names().

### TQValueList<int> TQTextCodecPlugin::mibEnums () const`[pure virtual]`

Returns the list of mib enums supported by this plugin.

See also createForMib().

### TQStringList TQTextCodecPlugin::names () const`[pure virtual]`

Returns the list of mime names supported by this plugin.

See also createForName().

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.