Library: FastInfoset
Package: CodingAlgorithm
Header: Poco/FastInfoset/Encoding.h
Encoding class holds data for the different encoding types
Known Derived Classes: LongEncoding, IntEncoding, BoolEncoding, CDataEncoding, DWordEncoding, DoubleEncoding, FloatEncoding, HexEncoding, NullRefEncoding, NullEncoding, ShortEncoding, UUIDEncoding
Member Functions: createContent, getContent, getDecodeMethod, getEncodeChecker, getEncodeMethod, handle, merge, type, write
typedef EncodingPtr (* DecodeMethod)(BitStreamReader & reader);
Decodes data from the reader into the returned Encoding for which it is guaranteed that createContent was called
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
typedef void (* EncodeMethod)(BitStreamWriter &, const Poco::XML::XMLString &);
Encoding();
Creates the Encoding.
virtual ~Encoding();
Destroys the Encoding.
virtual void createContent() = 0;
Sets the content. Must be called before calling getContent
virtual const Poco::XML::XMLString & getContent() const;
Returns the content as string
virtual Poco::XML::XMLString & getContent();
Returns the content as string
virtual DecodeMethod getDecodeMethod() const = 0;
virtual EncodeCheck getEncodeChecker() const = 0;
virtual EncodeMethod getEncodeMethod() const = 0;
void handle(
Poco::XML::ContentHandler * pHandler
);
virtual void handle(
FISContentHandler * pHandler
) = 0;
virtual bool merge(
const Encoding & enc
) = 0;
Merges the provided enc into the current one iff the two encoding types are identical
virtual Poco::UInt32 type() const = 0;
Returns the encoding type
virtual void write(
BitStreamWriter & writer
) = 0;
Writes the internally stored data to the writer
Poco::XML::XMLString _content;