Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

ExaltCodec Class Reference

Convenience class for easy XML encoding/decoding. More...

#include <exaltcodec.h>

Inheritance diagram for ExaltCodec:

XmlCodecBase UserOfTextCodec List of all members.

Public Methods

 ExaltCodec (void)
 A constructor. More...

virtual ~ExaltCodec (void)
 A destructor. More...

virtual bool encode (const char *inFileName, const char *outFileName)
 Encode data in specified file. More...

virtual bool encode (IODevice *inDevice, IODevice *outDevice)
 Encode data in specified input device. More...

virtual void initializePushCoder (IODevice *outDevice)
 Initialize the coder in PUSH mode (using specified output device). More...

virtual void initializePushCoder (const char *outFileName)
 Initialize the coder in PUSH mode (using specified output file). More...

virtual bool encodePush (const char *data, int length, bool isFinal=false)
 Encode a chunk of XML data in PUSH mode. More...

virtual bool decode (const char *inFileName, const char *outFileName)
 Decode data from specified file. More...

virtual bool decode (IODevice *inDevice, IODevice *outDevice)
 Decode data from specified input device. More...

virtual bool decode (IODevice *inDevice, SAXReceptor *receptor, void *userData=0)
 Decode data from specified input device and use SAX event receptor. More...

virtual bool decode (const char *inFileName, SAXReceptor *receptor, void *userData=0)
 Decode data from specified file and use SAX event receptor. More...


Protected Attributes

XmlCodecBasexmlCodec
 The instance of the XmlCodec.


Detailed Description

Convenience class for easy XML encoding/decoding.

ExaltCodec offers a simple interface for encoding and decoding XML data.

Definition at line 54 of file exaltcodec.h.


Constructor & Destructor Documentation

ExaltCodec::ExaltCodec void   
 

A constructor.

Creates an instance of XmlCodec.

Definition at line 48 of file exaltcodec.cpp.

References NEW, and xmlCodec.

ExaltCodec::~ExaltCodec void    [virtual]
 

A destructor.

Deletes the instance of XmlCodec.

Definition at line 59 of file exaltcodec.cpp.

References DELETE, UserOfTextCodec::deleteDefaultTextCodec, and xmlCodec.


Member Function Documentation

bool ExaltCodec::decode const char *    inFileName,
SAXReceptor   receptor,
void *    userData = 0
[virtual]
 

Decode data from specified file and use SAX event receptor.

The codec decodes the XML data from given file and sends SAX events to specified SAX receptor.

Parameters:
inFileName  The input file.
receptor  The SAX event receptor.
userData  The pointer to the user data structure.

Definition at line 280 of file exaltcodec.cpp.

References decode, DELETE, FATAL, NEW, and FileDevice::prepare.

bool ExaltCodec::decode IODevice   inDevice,
SAXReceptor   receptor,
void *    userData = 0
[virtual]
 

Decode data from specified input device and use SAX event receptor.

The codec decodes the XML data from the input device and sends SAX events to specified SAX receptor.

Parameters:
inDevice  The input device.
receptor  The SAX event receptor.
userData  The pointer to the user data structure.

Implements XmlCodecBase.

Definition at line 257 of file exaltcodec.cpp.

References XmlCodec::decode, DELETE, NEW, and xmlCodec.

bool ExaltCodec::decode IODevice   inDevice,
IODevice   outDevice
[virtual]
 

Decode data from specified input device.

The codec decodes the XML data from one device to another.

Parameters:
inDevice  The input device.
outDevice  The output device.

Definition at line 182 of file exaltcodec.cpp.

References UserOfTextCodec::createDefaultTextCodec, XmlCodecBase::decode, DELETE, ExaltOptions::getOption, NEW, UserOfTextCodec::setTextCodec, SHOW_RUNNING_TIME, UserOfTextCodec::textCodec, ExaltOptions::Verbose, xmlCodec, and ExaltOptions::Yes.

bool ExaltCodec::decode const char *    inFileName,
const char *    outFileName
[virtual]
 

Decode data from specified file.

The codec decodes the XML data from one file to another.

Parameters:
inFileName  The input file.
outFileName  The output file.

Definition at line 228 of file exaltcodec.cpp.

References DELETE, FileDevice::finish, NEW, and FileDevice::prepare.

Referenced by decode.

bool ExaltCodec::encode IODevice   inDevice,
IODevice   outDevice
[virtual]
 

Encode data in specified input device.

The codec encodes the XML data from one device to another.

Parameters:
inDevice  The input device.
outDevice  The output device.

Implements XmlCodecBase.

Definition at line 117 of file exaltcodec.cpp.

References UserOfTextCodec::createDefaultTextCodec, XmlCodecBase::encode, ExaltOptions::getOption, UserOfTextCodec::setTextCodec, SHOW_RUNNING_TIME, UserOfTextCodec::textCodec, ExaltOptions::Verbose, xmlCodec, and ExaltOptions::Yes.

bool ExaltCodec::encode const char *    inFileName,
const char *    outFileName
[virtual]
 

Encode data in specified file.

The codec encodes the XML data from one file to another.

Parameters:
inFileName  The input file.
outFileName  The output file.

Definition at line 153 of file exaltcodec.cpp.

References DELETE, FileDevice::finish, NEW, and FileDevice::prepare.

bool ExaltCodec::encodePush const char *    data,
int    length,
bool    isFinal = false
[virtual]
 

Encode a chunk of XML data in PUSH mode.

The coder encodes given chunk of data.

Parameters:
data  The chunk of XML data.
length  The length of the data.
isFinal  Indication whether the coder received the last chunk of data.

Implements XmlCodecBase.

Definition at line 102 of file exaltcodec.cpp.

References XmlCodecBase::encodePush, and xmlCodec.

void ExaltCodec::initializePushCoder const char *    outFileName [virtual]
 

Initialize the coder in PUSH mode (using specified output file).

Initializes the codec in PUSH mode with given output file name.

Parameters:
outFileName  The file used for output of compressed data.

Definition at line 83 of file exaltcodec.cpp.

References XmlCodecBase::initializePushCoder, NEW, FileDevice::prepare, and xmlCodec.

void ExaltCodec::initializePushCoder IODevice   outDevice [virtual]
 

Initialize the coder in PUSH mode (using specified output device).

Initializes the codec in PUSH mode with given output device.

Parameters:
outDevice  The output device used for output of compressed data.

Implements XmlCodecBase.

Definition at line 71 of file exaltcodec.cpp.

References XmlCodecBase::initializePushCoder, and xmlCodec.


The documentation for this class was generated from the following files:
Generated on Wed Feb 5 10:43:04 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002