XBinder XML Runtime  XBinder Version 3.0.x
Public Member Functions | Protected Member Functions | List of all members
OSXMLMessageBuffer Class Reference

The XML message buffer class is derived from the OSMessageBuffer base class. More...

#include <OSXMLMessageBuffer.h>

Inheritance diagram for OSXMLMessageBuffer:
OSXMLDecodeBuffer OSXMLEncodeBase OSXMLEncodeBuffer OSXMLEncodeStream

Public Member Functions

virtual EXTXMLMETHOD void * getAppInfo ()
 The getAppInfo method returns the pointer to application context information.
 
EXTXMLMETHOD int getIndent ()
 This method returns current XML output indent value. More...
 
EXTXMLMETHOD int getIndentChar ()
 This method returns current XML output indent character value (default is space). More...
 
EXTXMLMETHOD OSBOOL getWriteBOM ()
 This function returns whether writing the Unicode BOM is currently enabled or disabled. More...
 
virtual EXTXMLMETHOD void setNamespace (const OSUTF8CHAR *prefix, const OSUTF8CHAR *uri, OSRTDList *pNSAttrs=0)
 This method sets a namespace in the context namespace list. More...
 
virtual EXTXMLMETHOD void setAppInfo (void *pXMLInfo)
 This method sets application specific context information within the common context structure. More...
 
EXTXMLMETHOD void setFormatting (OSBOOL doFormatting)
 This method sets XML output formatting to the given value. More...
 
EXTXMLMETHOD void setIndent (OSUINT8 indent)
 This method sets XML output indent to the given value. More...
 
EXTXMLMETHOD void setIndentChar (char indentChar)
 This method sets XML output indent character to the given value. More...
 
EXTXMLMETHOD void setWriteBOM (OSBOOL write)
 This method sets whether to write the Unicode byte order mark before the XML header. More...
 

Protected Member Functions

EXTXMLMETHOD OSXMLMessageBuffer (Type bufferType, OSRTContext *pContext=0)
 The protected constructor creates a new context and sets the buffer class type. More...
 

Detailed Description

The XML message buffer class is derived from the OSMessageBuffer base class.

It is the base class for the OSXMLEncodeBuffer and OSXMLDecodeBuffer classes. It contains variables and methods specific to encoding or decoding XML messages. It is used to manage the buffer into which a message is to be encoded or decoded.

Definition at line 42 of file OSXMLMessageBuffer.h.

Constructor & Destructor Documentation

◆ OSXMLMessageBuffer()

EXTXMLMETHOD OSXMLMessageBuffer::OSXMLMessageBuffer ( Type  bufferType,
OSRTContext *  pContext = 0 
)
protected

The protected constructor creates a new context and sets the buffer class type.

Parameters
bufferTypeType of message buffer that is being created (for example, XMLEncode or XMLDecode).
pContextPointer to a context to use. If NULL, new context will be allocated.

Member Function Documentation

◆ getIndent()

EXTXMLMETHOD int OSXMLMessageBuffer::getIndent ( )

This method returns current XML output indent value.

Returns
Current indent value (>= 0) if OK, negative status code if error.

◆ getIndentChar()

EXTXMLMETHOD int OSXMLMessageBuffer::getIndentChar ( )

This method returns current XML output indent character value (default is space).

Returns
Current indent character (> 0) if OK, negative status code if error.

◆ getWriteBOM()

EXTXMLMETHOD OSBOOL OSXMLMessageBuffer::getWriteBOM ( )

This function returns whether writing the Unicode BOM is currently enabled or disabled.

Returns
TRUE if writing BOM is enabled, FALSE otherwise.

◆ setAppInfo()

virtual EXTXMLMETHOD void OSXMLMessageBuffer::setAppInfo ( void *  pXMLInfo)
virtual

This method sets application specific context information within the common context structure.

For XML encoding/decoding, this is a structure of type OSXMLCtxtInfo.

Parameters
pXMLInfoPointer to context information.

◆ setFormatting()

EXTXMLMETHOD void OSXMLMessageBuffer::setFormatting ( OSBOOL  doFormatting)

This method sets XML output formatting to the given value.

If TRUE (the default), the XML document is formatted with indentation and newlines. If FALSE, all whitespace between elements is suppressed. Turning formatting off can provide more compressed documents and also a more canonical representation which is important for security applications.

Parameters
doFormattingBoolean value indicating if formatting is to be done
Returns
Status of operation: 0 if OK, negative status code if error.

◆ setIndent()

EXTXMLMETHOD void OSXMLMessageBuffer::setIndent ( OSUINT8  indent)

This method sets XML output indent to the given value.

Parameters
indentNumber of spaces per indent. Default is 3.

◆ setIndentChar()

EXTXMLMETHOD void OSXMLMessageBuffer::setIndentChar ( char  indentChar)

This method sets XML output indent character to the given value.

Parameters
indentCharIndent character. Default is space.

◆ setNamespace()

virtual EXTXMLMETHOD void OSXMLMessageBuffer::setNamespace ( const OSUTF8CHAR *  prefix,
const OSUTF8CHAR *  uri,
OSRTDList *  pNSAttrs = 0 
)
virtual

This method sets a namespace in the context namespace list.

If the given namespace URI does not exist in the list, the namespace is added. If the URI is found, the value of the namespace prefix will be changed to the given prefix.

Parameters
prefixNamespace prefix
uriNamespace URI
pNSAttrsNamespace list to which namespace is to be added

◆ setWriteBOM()

EXTXMLMETHOD void OSXMLMessageBuffer::setWriteBOM ( OSBOOL  write)

This method sets whether to write the Unicode byte order mark before the XML header.

Parameters
writeTRUE if BOM should be written, FALSE otherwise.

The documentation for this class was generated from the following file: