#include <xmlcodec.h>
Inheritance diagram for XmlCodec:
Public Methods | |
XmlCodec (void) | |
A constructor. More... | |
virtual | ~XmlCodec (void) |
A destructor. More... | |
virtual bool | encode (IODevice *inDevice, IODevice *outDevice) |
Encode data from one device to another (the PULL mode). More... | |
virtual void | initializePushCoder (IODevice *outDevice) |
Initialize the coder in PUSH mode. More... | |
virtual bool | encodePush (const char *data, int length, bool isFinal=false) |
Encode the data in PUSH mode. More... | |
virtual bool | decode (IODevice *inDevice, SAXReceptor *receptor, void *userData=0) |
Decode data from one device and use given SAX receptor. More... | |
Protected Attributes | |
IODevice * | inputDevice |
The input device. | |
IODevice * | outputDevice |
The output device. | |
XmlParser * | xmlParser |
The XML parser. | |
XmlModelBase * | xmlModel |
The XML model. | |
KYGrammar * | kyGrammar |
The KY grammar. | |
Context * | context |
The arithmetic coding context. | |
ArithCodec * | arithCodec |
The arithmetic coder/decoder. |
This class implements the XML data encoding and decoding operations.
Definition at line 53 of file xmlcodec.h.
|
A constructor. Does nothing special. Definition at line 61 of file xmlcodec.cpp. |
|
A destructor. Deletes the default text codec (if any). Definition at line 71 of file xmlcodec.cpp. References UserOfTextCodec::deleteDefaultTextCodec. |
|
|
Encode data from one device to another (the PULL mode). The codec creates all of the necessary underlying components and encodes the data.
Implements XmlCodecBase. Definition at line 223 of file xmlcodec.cpp. References arithCodec, B_BITS, XmlCodecBase::coderType, context, DELETE, DISPLAY_COMPRESSION_SUMMARY, ArithCodec::doneOutputtingBits, Context::encodeEndOfMessage, F_BITS, FILE_STAMP, ArithCodec::finishEncode, ExaltOptions::getOption, inputDevice, kyGrammar, ExaltOptions::Model, NEW, outputDevice, XmlParser::parse, PullCoder, IODevice::putChar, ContextBase::setArithCodec, KYGrammar::setContext, XmlModelBase::setGrammar, XmlParserBase::setInputDevice, ArithCodecBase::setOutputDevice, KYGrammar::setOutputDevice, UserOfTextCodec::setTextCodec, XmlParserBase::setXmlModel, ExaltOptions::SimpleModel, ArithCodec::startEncode, ArithCodec::startOutputtingBits, UserOfTextCodec::textCodec, ExaltOptions::Verbose, IODevice::writeData, xmlModel, xmlParser, and ExaltOptions::Yes. |
|
Encode the data in PUSH mode. The coder encodes given chunk of data.
Implements XmlCodecBase. Definition at line 163 of file xmlcodec.cpp. References arithCodec, XmlCodecBase::coderType, context, DELETE, DISPLAY_COMPRESSION_SUMMARY, ArithCodec::doneOutputtingBits, Context::encodeEndOfMessage, ArithCodec::finishEncode, ExaltOptions::getOption, kyGrammar, XmlParser::parsePush, PullCoder, UnknownCoder, ExaltOptions::Verbose, xmlModel, xmlParser, and ExaltOptions::Yes. |
|
Initialize the coder in PUSH mode. Initializes the codec in PUSH mode.
Implements XmlCodecBase. Definition at line 82 of file xmlcodec.cpp. References arithCodec, B_BITS, XmlCodecBase::coderType, context, F_BITS, FILE_STAMP, ExaltOptions::getOption, inputDevice, kyGrammar, ExaltOptions::Model, NEW, outputDevice, PullCoder, PushCoder, IODevice::putChar, ContextBase::setArithCodec, KYGrammar::setContext, XmlModelBase::setGrammar, ArithCodecBase::setOutputDevice, KYGrammar::setOutputDevice, UserOfTextCodec::setTextCodec, XmlParserBase::setXmlModel, ExaltOptions::SimpleModel, ArithCodec::startEncode, ArithCodec::startOutputtingBits, UserOfTextCodec::textCodec, UnknownCoder, IODevice::writeData, xmlModel, and xmlParser. |