#include <yatephone.h>
Inheritance diagram for DataTranslator:
Public Member Functions | |
DataTranslator (const char *sFormat, const char *dFormat) | |
DataTranslator (const char *sFormat, DataSource *source=0) | |
~DataTranslator () | |
virtual void * | getObject (const String &name) const |
virtual DataSource * | getTransSource () const |
DataTranslator * | getFirstTranslator () |
const DataTranslator * | getFirstTranslator () const |
Static Public Member Functions | |
static ObjList * | srcFormats (const DataFormat &dFormat="slin", int maxCost=-1, unsigned int maxLen=0, ObjList *lst=0) |
static ObjList * | destFormats (const DataFormat &sFormat="slin", int maxCost=-1, unsigned int maxLen=0, ObjList *lst=0) |
static bool | canConvert (const DataFormat &fmt1, const DataFormat &fmt2="slin") |
static int | cost (const DataFormat &sFormat, const DataFormat &dFormat) |
static DataTranslator * | create (const DataFormat &sFormat, const DataFormat &dFormat) |
static bool | attachChain (DataSource *source, DataConsumer *consumer, bool override=false) |
static bool | detachChain (DataSource *source, DataConsumer *consumer) |
static void | setMaxChain (unsigned int maxChain) |
Protected Member Functions | |
virtual bool | synchronize (DataSource *source) |
Static Protected Member Functions | |
static void | install (TranslatorFactory *factory) |
static void | uninstall (TranslatorFactory *factory) |
Friends | |
class | TranslatorFactory |
The DataTranslator holds a translator (codec) capable of unidirectional conversion of data from one type to another.
|
Construct a data translator.
|
|
Creates a data translator from an existing source, does not increment the source's reference counter.
|
|
Destroys the translator and its source |
|
Attach a consumer to a source, possibly trough a chain of translators
|
|
Check if bidirectional conversion can be performed by installed translators
|
|
Finds the cost of a translator given the source and destination format names
|
|
Creates a translator given the source and destination format names
|
|
Get a list of formats supported for a given input format
|
|
Detach a consumer from a source, possibly trough a chain of translators
|
|
Constant version to get the first translator from a chain
|
|
Get the first translator from a chain
|
|
Get a pointer to a derived class given that class name
Reimplemented from DataConsumer. |
|
Get the data source of a translator object
Reimplemented from DataConsumer. |
|
Install a Translator Factory in the list of known codecs
|
|
Set the length of the longest translator chain we are allowed to create
|
|
Get a list of formats supported for a given output format.
|
|
Synchronize the consumer with a source
Reimplemented from DataConsumer. |
|
Remove a Translator Factory from the list of known codecs
|