Poco::FastInfoset

class Encoding

Library: FastInfoset
Package: CodingAlgorithm
Header: Poco/FastInfoset/Encoding.h

Description

Encoding class holds data for the different encoding types

Inheritance

Known Derived Classes: LongEncoding, IntEncoding, BoolEncoding, CDataEncoding, DWordEncoding, DoubleEncoding, FloatEncoding, HexEncoding, NullRefEncoding, NullEncoding, ShortEncoding, UUIDEncoding

Member Summary

Member Functions: createContent, getContent, getDecodeMethod, getEncodeChecker, getEncodeMethod, handle, merge, type, write

Types

EncodingPtr

typedef EncodingPtr (* DecodeMethod)(BitStreamReader & reader);

Decodes data from the reader into the returned Encoding for which it is guaranteed that createContent was called

Poco::Int32

typedef Poco::Int32 (* EncodeCheck)(const Poco::XML::XMLString &);

If it can encode the string, it will return the size of the compressed data, otherwise a value <= 0 All subclasses should provide a static canEncode method that follows this signature

void

typedef void (* EncodeMethod)(BitStreamWriter &, const Poco::XML::XMLString &);

Constructors

Encoding

Encoding();

Creates the Encoding.

Destructor

~Encoding virtual

virtual ~Encoding();

Destroys the Encoding.

Member Functions

createContent virtual

virtual void createContent() = 0;

Sets the content. Must be called before calling getContent

getContent virtual inline

virtual const Poco::XML::XMLString & getContent() const;

Returns the content as string

getContent virtual

virtual Poco::XML::XMLString & getContent();

Returns the content as string

getDecodeMethod virtual

virtual DecodeMethod getDecodeMethod() const = 0;

getEncodeChecker virtual

virtual EncodeCheck getEncodeChecker() const = 0;

getEncodeMethod virtual

virtual EncodeMethod getEncodeMethod() const = 0;

handle inline

void handle(
    Poco::XML::ContentHandler * pHandler
);

handle virtual

virtual void handle(
    FISContentHandler * pHandler
) = 0;

merge virtual

virtual bool merge(
    const Encoding & enc
) = 0;

Merges the provided enc into the current one iff the two encoding types are identical

type virtual

virtual Poco::UInt32 type() const = 0;

Returns the encoding type

write virtual

virtual void write(
    BitStreamWriter & writer
) = 0;

Writes the internally stored data to the writer

Variables

_content protected

Poco::XML::XMLString _content;