xmlpp::OutputBuffer Class Reference

Base class for xmlOutputBuffer wrapper. More...

#include <libxml++/io/outputbuffer.h>

Inheritance diagram for xmlpp::OutputBuffer:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 OutputBuffer (const Glib::ustring& encoding=Glib::ustring())
_xmlOutputBuffer* cobj ()
 gives an access to the underlying libxml structure to the children
const _xmlOutputBuffer* cobj () const
 gives an access to the underlying libxml structure to the children

Private Member Functions

virtual bool do_write (const char* buffer, int len)=0
 Function called when some data are sent to the buffer.
virtual bool do_close ()
 Function called before closing the buffer.

Private Attributes

_xmlOutputBuffer* impl_
 Underlying libxml2 structure.


Detailed Description

Base class for xmlOutputBuffer wrapper.

It can be herited to create a new output buffer. A child class has to override do_write, and eventually do_close if some actions are required before buffer closing.


Constructor & Destructor Documentation

xmlpp::OutputBuffer::OutputBuffer ( const Glib::ustring encoding = Glib::ustring()  ) 

Parameters:
encoding The encoding herited class wait for in do_write. If not provided, UTF-8 will be sent to do_write.
Warning:
The encoding is done by libxml. As a consequence, libxml must have a translator to the target encoding.


Member Function Documentation

virtual bool xmlpp::OutputBuffer::do_close (  )  [private, virtual]

Function called before closing the buffer.

Herited classes should override it if some actions are required before closing the buffer, instead of doing them in the destructor.

Reimplemented in xmlpp::OStreamOutputBuffer.

virtual bool xmlpp::OutputBuffer::do_write ( const char *  buffer,
int  len 
) [private, pure virtual]

Function called when some data are sent to the buffer.

Parameters:
buffer The datas encoded in the charset given to the constructor
len Buffer length
This function MUST be overriden in herited classes.

Implemented in xmlpp::OStreamOutputBuffer.


Generated on Fri Apr 16 13:26:12 2010 for libxml++ by  doxygen 1.5.8