Yate
Public Member Functions

XMLElementOut Class Reference

An outgoing XML element. More...

#include <xmlparser.h>

Inheritance diagram for XMLElementOut:
RefObject GenObject

List of all members.

Public Member Functions

 XMLElementOut (XMLElement *element, const char *senderID=0, bool unclose=false)
virtual ~XMLElementOut ()
XMLElementelement () const
bool sent () const
Stringbuffer ()
const Stringid () const
u_int32_t dataCount ()
const char * getData (u_int32_t &nCount)
void dataSent (u_int32_t nCount)
XMLElementrelease ()
void toBuffer (String &buffer)
void prepareToSend ()

Detailed Description

An outgoing XML element.

This class holds an XML element to be sent through a stream


Constructor & Destructor Documentation

XMLElementOut ( XMLElement element,
const char *  senderID = 0,
bool  unclose = false 
) [inline]

Constructor

Parameters:
elementThe XML element
senderIDOptional sender id
uncloseTrue to not close the tag when building the buffer
virtual ~XMLElementOut ( ) [inline, virtual]

Destructor Delete m_element if not 0

References TelEngine::destruct().


Member Function Documentation

String& buffer ( ) [inline]

Get the data buffer

Returns:
The data buffer
u_int32_t dataCount ( ) [inline]

Get the remainig byte count to send

Returns:
The unsent number of bytes

References String::length().

void dataSent ( u_int32_t  nCount) [inline]

Increase the offset with nCount bytes. Set the sent flag

Parameters:
nCountThe number of bytes sent
XMLElement* element ( ) const [inline]

Get the underlying element

Returns:
The underlying element
const char* getData ( u_int32_t &  nCount) [inline]

Get the remainig data to send. Set the buffer if not already set

Parameters:
nCountThe number of unsent bytes
Returns:
Pointer to the remaining data or 0
const String& id ( ) const [inline]

Get the id member

Returns:
The id member
void prepareToSend ( ) [inline]

Fill the buffer with the XML element to send

XMLElement* release ( ) [inline]

Release the ownership of m_element The caller is responsable of returned pointer

Returns:
XMLElement pointer or 0
bool sent ( ) const [inline]

Check if this element was (partially) sent

Returns:
True if an attempt to send this element was already done
void toBuffer ( String buffer) [inline]

Fill a buffer with the XML element to send

Parameters:
bufferThe buffer to fill

References XMLElement::toString().


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