An outgoing XML element. More...
#include <xmlparser.h>
Public Member Functions | |
| XMLElementOut (XMLElement *element, const char *senderID=0, bool unclose=false) | |
| virtual | ~XMLElementOut () |
| XMLElement * | element () const |
| bool | sent () const |
| String & | buffer () |
| const String & | id () const |
| u_int32_t | dataCount () |
| const char * | getData (u_int32_t &nCount) |
| void | dataSent (u_int32_t nCount) |
| XMLElement * | release () |
| void | toBuffer (String &buffer) |
| void | prepareToSend () |
An outgoing XML element.
This class holds an XML element to be sent through a stream
| XMLElementOut | ( | XMLElement * | element, | |
| const char * | senderID = 0, |
|||
| bool | unclose = false | |||
| ) | [inline] |
Constructor
| element | The XML element | |
| senderID | Optional sender id | |
| unclose | True to not close the tag when building the buffer |
| virtual ~XMLElementOut | ( | ) | [inline, virtual] |
Destructor Delete m_element if not 0
References TelEngine::destruct().
| String& buffer | ( | ) | [inline] |
Get the data buffer
| u_int32_t dataCount | ( | ) | [inline] |
Get the remainig byte count to send
| void dataSent | ( | u_int32_t | nCount | ) | [inline] |
Increase the offset with nCount bytes. Set the sent flag
| nCount | The number of bytes sent |
| XMLElement* element | ( | ) | const [inline] |
Get the underlying element
| const char* getData | ( | u_int32_t & | nCount | ) | [inline] |
Get the remainig data to send. Set the buffer if not already set
| nCount | The number of unsent bytes |
| const String& id | ( | ) | const [inline] |
Get 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
| bool sent | ( | ) | const [inline] |
Check if this element was (partially) sent
| void toBuffer | ( | String & | buffer | ) | [inline] |
Fill a buffer with the XML element to send
| buffer | The buffer to fill |
References XMLElement::toString().
1.6.3