Poco::Netconf

class Serializer

Library: Netconf
Package: Netconf
Header: Poco/Netconf/Serializer.h

Description

Generates a Netconf conform serialized version of the data.

Inheritance

Direct Base Classes: Poco::Remoting::Serializer

All Base Classes: Poco::Remoting::Serializer

Member Summary

Member Functions: forceDataWrite, getMsgIdOfLastRequest, popActiveNamespace, pushActiveNamespace, pushAttribute, resetImpl, serialize, serializeComplexTypeEnd, serializeComplexTypeStart, serializeError, serializeNullElement, serializeReplyEnd, serializeReplyStart, serializeRequestEnd, serializeRequestStart, serializeVectorBegin, serializeVectorEnd, setDeserializer, setInfoForReply, setOutputStreamImpl

Inherited Functions: getProperty, hasProperty, popProperty, pushAttribute, pushProperty, reset, resetImpl, serialize, serializeComplexTypeEnd, serializeComplexTypeStart, serializeError, serializeNullElement, serializeReplyEnd, serializeReplyStart, serializeRequestEnd, serializeRequestStart, serializeVectorBegin, serializeVectorEnd, setOutputStream, setOutputStreamImpl

Enumerations

Anonymous

INVALID_MSG_ID = - 1

Constructors

Serializer

Serializer();

Creates the Serializer.

Destructor

~Serializer virtual

~Serializer();

Destroys the Serializer.

Member Functions

forceDataWrite

void forceDataWrite();

Enforces in reply mode that a <data> entry is written (for null return params).

getMsgIdOfLastRequest inline

int getMsgIdOfLastRequest() const;

Returns the msgId of the last request.

popActiveNamespace inline

void popActiveNamespace();

Removes the last pushed namespace.

pushActiveNamespace inline

void pushActiveNamespace(
    const XML::XMLString & nameSpace
);

Netconf requires us to define a namespace for each class we serialize.

pushAttribute virtual inline

void pushAttribute(
    const std::string & attrNamespace,
    const std::string & attrName
);

Informs the serializer that some data should be written as an attribute

See also: Poco::Remoting::Serializer::pushAttribute()

serialize virtual inline

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

Serializes an Int8.

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

serialize virtual

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

Serializes an UInt8.

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

serialize virtual

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

Serializes an Int16.

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

serialize virtual

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

Serializes an UInt16.

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

serialize virtual

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

Serializes an Int32.

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

serialize virtual

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

Serializes an UInt32.

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

serialize virtual

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

Serializes a long.

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

serialize virtual

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

Serializes an unsigned long.

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

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int64 val
);

Serializes an Int64.

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

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt64 val
);

Serializes an UInt64.

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

serialize virtual

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

Serializes a float.

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

serialize virtual

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

Serializes a double.

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

serialize virtual

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

Serializes a boolean.

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

serialize virtual

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

Serializes a single character.

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

serialize virtual

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

Serializes a const char ptr.

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

serialize virtual

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

Serializes a string.

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

serializeComplexTypeEnd virtual

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

Invoked after all members of a complex data type were serialized.

See also: Poco::Remoting::Serializer::serializeComplexTypeEnd()

serializeComplexTypeStart virtual

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

Invoked before a complex data type is serialized.

See also: Poco::Remoting::Serializer::serializeComplexTypeStart()

serializeError virtual

void serializeError(
    std::ostream & out,
    const std::string & methodName,
    Poco::Exception & e
);

Serializes an exception.

See also: Poco::Remoting::Serializer::serializeError()

serializeNullElement virtual

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

Serializes a null element.

See also: Poco::Remoting::Serializer::serializeNullElement()

serializeReplyEnd virtual

void serializeReplyEnd(
    const std::string & methodName
);

Indicates the end of method serialization.

See also: Poco::Remoting::Serializer::serializeReplyEnd()

serializeReplyStart virtual

void serializeReplyStart(
    const std::string & methodName
);

Indicates the begin of method serialization reply.

See also: Poco::Remoting::Serializer::serializeReplyStart()

serializeRequestEnd virtual

void serializeRequestEnd(
    const std::string & methodName
);

Indicates the end of method serialization.

See also: Poco::Remoting::Serializer::serializeRequestEnd()

serializeRequestStart virtual

void serializeRequestStart(
    const std::string & methodName
);

Indicates the begin of method serialization.

See also: Poco::Remoting::Serializer::serializeRequestStart()

serializeVectorBegin virtual

void serializeVectorBegin(
    const std::string & name,
    Poco::UInt32 numElems
);

Called before the first name of a vector is serialized.

See also: Poco::Remoting::Serializer::serializeVectorBegin()

serializeVectorEnd virtual

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

Called after the last name of a vector was serialized.

See also: Poco::Remoting::Serializer::serializeVectorEnd()

setDeserializer inline

void setDeserializer(
    Deserializer * pDeser
);

Sets the deserializer.

setInfoForReply inline

void setInfoForReply(
    const XML::Attributes * pReplyAttr
);

sets the attributes required for reply

resetImpl protected virtual

void resetImpl();

See also: Poco::Remoting::Serializer::resetImpl()

setOutputStreamImpl protected virtual

void setOutputStreamImpl(
    std::ostream & out
);

Manually sets the output stream. Required before one can use the serializer. Call reset to remove the outstream.

See also: Poco::Remoting::Serializer::setOutputStreamImpl()

Variables

ATTR_MESSAGE_ID static

static const XML::XMLString ATTR_MESSAGE_ID;

ATTR_OPERATION static

static const XML::XMLString ATTR_OPERATION;

EMPTYATTRIBUTES static

static const XML::AttributesImpl EMPTYATTRIBUTES;

EMPTYSTRING static

static const XML::XMLString EMPTYSTRING;

ERROR_INFO static

static const XML::XMLString ERROR_INFO;

ERROR_MESSAGE static

static const XML::XMLString ERROR_MESSAGE;

ERROR_SEVERITY static

static const XML::XMLString ERROR_SEVERITY;

ERROR_TAG static

static const XML::XMLString ERROR_TAG;

ERROR_TYPE static

static const XML::XMLString ERROR_TYPE;

NAMESPACEURI static

static const XML::XMLString NAMESPACEURI;

RPC static

static const XML::XMLString RPC;

RPC_DATA static

static const XML::XMLString RPC_DATA;

RPC_ERROR static

static const XML::XMLString RPC_ERROR;

RPC_OK static

static const XML::XMLString RPC_OK;

RPC_REPLY static

static const XML::XMLString RPC_REPLY;

VAL_ERROR static

static const XML::XMLString VAL_ERROR;

VAL_FALSE static

static const XML::XMLString VAL_FALSE;

VAL_TRUE static

static const XML::XMLString VAL_TRUE;