Poco::RemotingNG

class BinarySerializer

Library: RemotingNG
Package: Serialization
Header: Poco/RemotingNG/BinarySerializer.h

Description

A generic Serializer using a proprietary binary serialization format based on the Poco::BinaryWriter class.

This class can be used by all Transport implementations using a binary serialization format that does not need to be interoperable with other network protocols.

This serializer uses a Poco::BinaryWriter for serializing data in binary form. Data is always written in the host's native endian format. To allow the deserializer finding out the endianess used by the serializer, a byte order mark is written at the beginning of the message.

Messages created by the BinarySerializer are not self describing and contain only minimal measures for detecting deserialization failures or message version incompatibilities.

Inheritance

Direct Base Classes: Serializer

All Base Classes: Serializer, SerializerBase

Member Summary

Member Functions: resetImpl, serialize, serializeFaultMessage, serializeMessageBegin, serializeMessageEnd, serializeNullableBegin, serializeNullableEnd, serializeSequenceBegin, serializeSequenceEnd, serializeStructBegin, serializeStructEnd, setupImpl

Inherited Functions: clearProperties, getProperty, hasProperty, popProperty, pushAttribute, pushProperty, reset, resetImpl, serialize, serializeFaultMessage, serializeMessageBegin, serializeMessageEnd, serializeNullableBegin, serializeNullableEnd, serializeSequenceBegin, serializeSequenceEnd, serializeStructBegin, serializeStructEnd, setup, setupImpl

Enumerations

MessageCode protected

MESSAGE_CODE_REQUEST = 0x01

MESSAGE_CODE_EVENT = 0x02

MESSAGE_CODE_REPLY = 0x11

MESSAGE_CODE_EVENT_REPLY = 0x12

MESSAGE_CODE_FAULT = 0x18

Constructors

BinarySerializer

BinarySerializer();

Creates a BinarySerializer.

Destructor

~BinarySerializer virtual

~BinarySerializer();

Destroys the BinarySerializer.

Member Functions

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int8 value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt8 value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int16 value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt16 value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int32 value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt32 value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    long value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    unsigned long value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    float value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    double value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    bool value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    char value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    const std::string & value
);

See also: Poco::RemotingNG::Serializer::serialize()

serialize virtual

void serialize(
    const std::string & name,
    const std::vector < char > & value
);

See also: Poco::RemotingNG::Serializer::serialize()

serializeFaultMessage virtual

void serializeFaultMessage(
    const std::string & name,
    Poco::Exception & exc
);

See also: Poco::RemotingNG::Serializer::serializeFaultMessage()

serializeMessageBegin virtual

void serializeMessageBegin(
    const std::string & name,
    SerializerBase::MessageType type
);

See also: Poco::RemotingNG::Serializer::serializeMessageBegin()

serializeMessageEnd virtual

void serializeMessageEnd(
    const std::string & name,
    SerializerBase::MessageType type
);

See also: Poco::RemotingNG::Serializer::serializeMessageEnd()

serializeNullableBegin virtual

void serializeNullableBegin(
    const std::string & name,
    bool isNull
);

See also: Poco::RemotingNG::Serializer::serializeNullableBegin()

serializeNullableEnd virtual

void serializeNullableEnd(
    const std::string & name
);

See also: Poco::RemotingNG::Serializer::serializeNullableEnd()

serializeSequenceBegin virtual

void serializeSequenceBegin(
    const std::string & name,
    Poco::UInt32 length
);

See also: Poco::RemotingNG::Serializer::serializeSequenceBegin()

serializeSequenceEnd virtual

void serializeSequenceEnd(
    const std::string & name
);

See also: Poco::RemotingNG::Serializer::serializeSequenceEnd()

serializeStructBegin virtual

void serializeStructBegin(
    const std::string & name
);

See also: Poco::RemotingNG::Serializer::serializeStructBegin()

serializeStructEnd virtual

void serializeStructEnd(
    const std::string & name
);

See also: Poco::RemotingNG::Serializer::serializeStructEnd()

resetImpl protected virtual

void resetImpl();

See also: Poco::RemotingNG::SerializerBase::resetImpl()

setupImpl protected virtual

void setupImpl(
    std::ostream & ostr
);

See also: Poco::RemotingNG::Serializer::setupImpl()

Variables

MESSAGE_END_TAG protected static

static const std::string MESSAGE_END_TAG;

MESSAGE_START_TAG protected static

static const std::string MESSAGE_START_TAG;