Library: Remoting/Binary
Package: Binary
Header: Poco/Remoting/Binary/Serializer.h
The serializer for the Binary transport.
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.
Direct Base Classes: Poco::Remoting::Serializer
All Base Classes: Poco::Remoting::Serializer
Member Functions: pushAttribute, resetImpl, serialize, serializeComplexTypeEnd, serializeComplexTypeStart, serializeError, serializeNullElement, serializeReplyEnd, serializeReplyStart, serializeRequestEnd, serializeRequestStart, serializeVectorBegin, serializeVectorEnd, setOutputStreamImpl, writeProtocolPrefix, writeProtocolPrefixRequest
Inherited Functions: getProperty, hasProperty, popProperty, pushAttribute, pushProperty, reset, resetImpl, serialize, serializeComplexTypeEnd, serializeComplexTypeStart, serializeError, serializeNullElement, serializeReplyEnd, serializeReplyStart, serializeRequestEnd, serializeRequestStart, serializeVectorBegin, serializeVectorEnd, setOutputStream, setOutputStreamImpl
Serializer();
Creates the Serializer.
~Serializer();
Destroys the Serializer.
void pushAttribute(
const std::string & attrNamespace,
const std::string & attrName
);
void serialize(
const std::string & name,
Poco::Int8 val
);
Serializes an Int8.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
Poco::UInt8 val
);
Serializes an UInt8.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
Poco::Int16 val
);
Serializes an Int16.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
Poco::UInt16 val
);
Serializes an UInt16.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
Poco::Int32 val
);
Serializes an Int32.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
Poco::UInt32 val
);
Serializes an UInt32.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
long val
);
Serializes a long.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
unsigned long val
);
Serializes an unsigned long.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
float val
);
Serializes a float.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
double val
);
Serializes a double.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
bool val
);
Serializes a boolean.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
char val
);
Serializes a single character.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
const char * pVal
);
Serializes a const char ptr.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
const std::string & val
);
Serializes a string.
See also: Poco::Remoting::Serializer::serialize()
void serialize(
const std::string & name,
const std::vector < char > & val
);
Serializes a byte vector.
See also: Poco::Remoting::Serializer::serialize()
void serializeComplexTypeEnd(
const std::string & name
);
Invoked after all members of a complex data type were serialized.
void serializeComplexTypeStart(
const std::string & name
);
Invoked before a complex data type is serialized.
void serializeError(
std::ostream & out,
const std::string & methodName,
Poco::Exception & e
);
Serializes an exception.
void serializeNullElement(
const std::string & name
);
Serializes a null element.
void serializeReplyEnd(
const std::string & methodName
);
Indicates the end of method serialization.
void serializeReplyStart(
const std::string & methodName
);
Indicates the begin of method serialization reply.
void serializeRequestEnd(
const std::string & methodName
);
Indicates the end of method serialization.
void serializeRequestStart(
const std::string & methodName
);
Indicates the begin of method serialization.
void serializeVectorBegin(
const std::string & name,
Poco::UInt32 numElems
);
Called before the first name of a vector is serialized.
void serializeVectorEnd(
const std::string & name
);
Called after the last name of a vector was serialized.
static void writeProtocolPrefix(
std::ostream & out
);
Writes the default protocol header for reply and exception
static void writeProtocolPrefixRequest(
std::ostream & out,
const Poco::Remoting::Identifiable::TypeId & tid,
const Poco::Remoting::Identifiable::ObjectId & oid
);
Writes the default protocol header including prefix + oid+tid
void resetImpl();
See also: Poco::Remoting::Serializer::resetImpl()
void setOutputStreamImpl(
std::ostream & out
);
Manually sets the output stream. Required before one can use the serializer. Call reset to remove the outstream.
static const std::string EOM;
static const std::string EXCEPTION_HEADER;
static const std::string REPLY_HEADER;
static const std::string REQUEST_HEADER;