XBinder XML Runtime
XBinder Version 3.0.x
|
The OSXMLEncodeStream class is derived from the OSXMLEncodeBase class. More...
#include <OSXMLEncodeStream.h>
Public Member Functions | |
EXTXMLMETHOD | OSXMLEncodeStream (OSRTOutputStream &outputStream) |
This version of the OSXMLEncodeStream constructor takes a reference to the OSOutputStream object. More... | |
OSXMLEncodeStream (OSRTOutputStream *pOutputStream, OSBOOL ownStream=TRUE) | |
This version of the OSXMLEncodeStream constructor takes a pointer to the OSRTOutputStream object. More... | |
virtual EXTXMLMETHOD int | init () |
This method reinitializes the encode stream to allow a new message to be encoded. More... | |
virtual OSBOOL | isA (Type bufferType) |
This is a virtual method that must be overridden by derived classes to allow identification of the class. More... | |
virtual const OSOCTET * | getMsgPtr () |
This is a virtual method that must be overridden by derived classes to allow access to the stored message. More... | |
OSRTOutputStream * | getStream () const |
This method returns the output stream associated with the object. More... | |
![]() | |
EXTXMLMETHOD int | encodeAttr (const OSUTF8CHAR *name, const OSUTF8CHAR *value) |
This function encodes an attribute in which the name and value are given as null-terminated UTF-8 strings. More... | |
EXTXMLMETHOD int | encodeText (const OSUTF8CHAR *value) |
This method encodes XML textual content. More... | |
EXTXMLMETHOD int | endDocument () |
This method ends an XML document by flushing any remaining data to the stream. | |
EXTXMLMETHOD int | endElement (const OSUTF8CHAR *elemName, OSXMLNamespace *pNS=0) |
This method encodes an end element tag value (</elemName>). More... | |
EXTXMLMETHOD int | startDocument () |
This method writes information to start an XML document to the encode stream. More... | |
EXTXMLMETHOD int | startElement (const OSUTF8CHAR *elemName, OSXMLNamespace *pNS=0, OSRTDList *pNSAttrs=0, OSBOOL terminate=FALSE) |
This method writes information to start an XML element to the encode stream. More... | |
EXTXMLMETHOD int | termStartElement () |
This metod terminates a currently open XML start element by adding either a '>' or '/>' (if empty) terminator. More... | |
![]() | |
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 Attributes | |
OSRTOutputStream * | mpStream |
A pointer to an OSRTOutputStream object. More... | |
OSBOOL | mbOwnStream |
TRUE if the OSXMLEncodeStream object will close and free the stream in the destructor. More... | |
Additional Inherited Members | |
![]() | |
EXTXMLMETHOD | OSXMLEncodeBase (OSRTContext *pContext=0) |
The protected constructor creates a new context and sets the buffer class type. More... | |
![]() | |
EXTXMLMETHOD | OSXMLMessageBuffer (Type bufferType, OSRTContext *pContext=0) |
The protected constructor creates a new context and sets the buffer class type. More... | |
The OSXMLEncodeStream class is derived from the OSXMLEncodeBase class.
It contains variables and methods specific to streaming encoding XML messages. It is used to manage the stream into which a message is to be encoded.
Definition at line 40 of file OSXMLEncodeStream.h.
EXTXMLMETHOD OSXMLEncodeStream::OSXMLEncodeStream | ( | OSRTOutputStream & | outputStream | ) |
This version of the OSXMLEncodeStream constructor takes a reference to the OSOutputStream object.
The stream is assumed to have been previously initialized.
outputStream | reference to the OSOutputStream object |
OSXMLEncodeStream::OSXMLEncodeStream | ( | OSRTOutputStream * | pOutputStream, |
OSBOOL | ownStream = TRUE |
||
) |
This version of the OSXMLEncodeStream constructor takes a pointer to the OSRTOutputStream object.
The stream is assumed to have been previously initialized. If ownStream is set to TRUE, then stream will be closed and freed in the destructor.
pOutputStream | reference to the OSOutputStream object |
ownStream | set ownership for the passed stream object. |
|
inlinevirtual |
This is a virtual method that must be overridden by derived classes to allow access to the stored message.
The base class implementation returns a null value.
Definition at line 106 of file OSXMLEncodeStream.h.
|
inline |
This method returns the output stream associated with the object.
Definition at line 113 of file OSXMLEncodeStream.h.
|
virtual |
This method reinitializes the encode stream to allow a new message to be encoded.
This makes it possible to reuse one stream object in a loop to encode multiple messages.
|
inlinevirtual |
This is a virtual method that must be overridden by derived classes to allow identification of the class.
The base class variant is abstract. This method matches an enumerated identifier defined in the base class. One identifier is declared for each of the derived classes.
bufferType | Enumerated identifier specifying a derived class. This type is defined as a public access type in the OSRTMessageBufferIF base interface. Possible values include BEREncode, BERDecode, PEREncode, PERDecode, XMLEncode, and XMLDecode. |
bufferType
argument is XMLEncode
or Stream
. Definition at line 95 of file OSXMLEncodeStream.h.
|
protected |
TRUE if the OSXMLEncodeStream object will close and free the stream in the destructor.
Definition at line 47 of file OSXMLEncodeStream.h.
|
protected |
A pointer to an OSRTOutputStream object.
Definition at line 43 of file OSXMLEncodeStream.h.