File Information
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, serializeEndPoint, serializeFaultMessage, serializeMessageBegin, serializeMessageEnd, serializeNullableBegin, serializeNullableEnd, serializeSequenceBegin, serializeSequenceEnd, serializeStructBegin, serializeStructEnd, serializeToken, setupImpl
Inherited Functions: clearProperties, getProperty, hasProperty, popProperty, pushAttribute, pushProperty, registerNamespace, reset, resetImpl, serialize, serializeFaultMessage, serializeMessageBegin, serializeMessageEnd, serializeNullableBegin, serializeNullableEnd, serializeOptionalBegin, serializeOptionalEnd, serializeSequenceBegin, serializeSequenceEnd, serializeStructBegin, serializeStructEnd, setup, setupImpl
Enumerations
MessageCode
MESSAGE_CODE_REQUEST = 0x01
MESSAGE_CODE_EVENT = 0x02
MESSAGE_CODE_REPLY = 0x11
MESSAGE_CODE_EVENT_REPLY = 0x12
MESSAGE_CODE_FAULT = 0x18
Constructors
BinarySerializer
Creates a BinarySerializer.
Destructor
~BinarySerializer
~BinarySerializer();
Destroys the BinarySerializer.
Member Functions
serialize
void serialize(
const std::string & name,
Poco::Int8 value
);
serialize
void serialize(
const std::string & name,
Poco::UInt8 value
);
serialize
void serialize(
const std::string & name,
Poco::Int16 value
);
serialize
void serialize(
const std::string & name,
Poco::UInt16 value
);
serialize
void serialize(
const std::string & name,
Poco::Int32 value
);
serialize
void serialize(
const std::string & name,
Poco::UInt32 value
);
serialize
void serialize(
const std::string & name,
long value
);
serialize
void serialize(
const std::string & name,
unsigned long value
);
serialize
void serialize(
const std::string & name,
Poco::Int64 value
);
serialize
void serialize(
const std::string & name,
Poco::UInt64 value
);
serialize
void serialize(
const std::string & name,
float value
);
serialize
void serialize(
const std::string & name,
double value
);
serialize
void serialize(
const std::string & name,
bool value
);
serialize
void serialize(
const std::string & name,
char value
);
serialize
void serialize(
const std::string & name,
const std::string & value
);
serialize
void serialize(
const std::string & name,
const std::vector < char > & value
);
serializeEndPoint
void serializeEndPoint(
const std::string & oid,
const std::string & tid
);
Serializes the object and type ID of the service object.
serializeFaultMessage
void serializeFaultMessage(
const std::string & name,
const Poco::Exception & exc
);
serializeMessageBegin
void serializeMessageBegin(
const std::string & name,
SerializerBase::MessageType type
);
serializeMessageEnd
void serializeMessageEnd(
const std::string & name,
SerializerBase::MessageType type
);
serializeNullableBegin
void serializeNullableBegin(
const std::string & name,
bool isNull
);
serializeNullableEnd
void serializeNullableEnd(
const std::string & name
);
serializeSequenceBegin
void serializeSequenceBegin(
const std::string & name,
Poco::UInt32 length
);
serializeSequenceEnd
void serializeSequenceEnd(
const std::string & name
);
serializeStructBegin
void serializeStructBegin(
const std::string & name
);
serializeStructEnd
void serializeStructEnd(
const std::string & name
);
serializeToken
template < typename T > void serializeToken(
T t
);
Serializes the given value, which must be a type directly supported by Poco::BinaryWriter.
resetImpl
void resetImpl();
setupImpl
void setupImpl(
std::ostream & ostr
);
Variables
MESSAGE_END_TAG
static const std::string MESSAGE_END_TAG;
MESSAGE_START_TAG
static const std::string MESSAGE_START_TAG;