Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ZipBuffer Class Reference

#include <zipbuffer.hpp>

Inheritance diagram for ZipBuffer:

Inheritance graph
[legend]
Collaboration diagram for ZipBuffer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements a XMLStreamBuffer using gzipped temporary files.

Definition at line 57 of file zipbuffer.hpp.

Public Methods

 ZipBuffer (const char *p_cFileName=0, bool p_boolReadOnly=false, unsigned int p_uiBufferSize=0)
 Constructor. Created a buffer which uses the designated file.

 ~ZipBuffer ()
 Destructor.

XMLStreamProvideroperator>> (XMLStreamConsumer &p_pStreamConsumer)
 Transfers data to the given buffer.

void writeData (const char *p_pszData, unsigned int p_uiDataLen)
 Writes raw data to the buffer.

bool commitStream (bool fFinal)
void flush ()
 Empties the buffer.


Static Public Methods

void setTmpDir (const char *p_pszTmpDir)
 Sets temporary directory.


Constructor & Destructor Documentation

ZipBuffer::ZipBuffer const char *    p_cFileName = 0,
bool    p_boolReadOnly = false,
unsigned int    p_uiBufferSize = 0
 

Constructor. Created a buffer which uses the designated file.

Parameters:
p_cFileName (const char*) name ofthe file to use
p_boolReadOnly (bool) ? read only ?

Definition at line 60 of file zipbuffer.cpp.

References DEBUG_CREATE, flush(), and ZIPBUFFER_COPYBUF.

ZipBuffer::~ZipBuffer  
 

Destructor.

Remarks:
If a temporary file is used, it is deleted upon object's destruction.

Definition at line 87 of file zipbuffer.cpp.

References DEBUG_DEL, and DEBUG_ECHO.


Member Function Documentation

bool ZipBuffer::commitStream bool    fFinal [virtual]
 

Reimplemented from XMLStreamConsumer.

Definition at line 223 of file zipbuffer.cpp.

References THROW_XMLFLOW_EXCEPTION.

Referenced by ZipStreamer::commitStream().

void ZipBuffer::flush  
 

Empties the buffer.

Remarks:
If the buffer is readonly, nothing is done.

Definition at line 176 of file zipbuffer.cpp.

References DEBUG_FUNC.

Referenced by ZipStreamer::initStream(), and ZipBuffer().

XMLStreamProvider & ZipBuffer::operator>> XMLStreamConsumer   p_pStreamConsumer [virtual]
 

Transfers data to the given buffer.

Parameters:
p_pXMLStreamBuffer (XMLStreamBuffer) Buffer to transfer data to.
Returns:
(XMLStreamBuffer&) self.
Exceptions:
XMLFlowException ERRCODE_CAUSE_MEMORY
XMLFlowException ERRCODE_CAUSE_FILE

Implements XMLStreamProvider.

Definition at line 106 of file zipbuffer.cpp.

References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, XMLStreamConsumer::commitStream(), DEBUG_IN, DEBUG_OUT, ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, THROW_XMLFLOW_EXCEPTION, WATCH_XML_FLOW_ERROR, and XMLStreamConsumer::writeData().

BEGIN_XDFLENGINE_NS void ZipBuffer::setTmpDir const char *    p_pszTmpDir [static]
 

Sets temporary directory.

Parameters:
p_strTmpDir (string) The path of the temporary directory.

Definition at line 51 of file zipbuffer.cpp.

void ZipBuffer::writeData const char *    p_pszData,
unsigned int    p_uiDataLen
[virtual]
 

Writes raw data to the buffer.

Parameters:
p_bData (const void*) bin data to write.
p_intSize (int) size of the data to write.
Exceptions:
XMLFlowException ERRCODE_CAUSE_FILE

Implements XMLStreamConsumer.

Definition at line 194 of file zipbuffer.cpp.

References THROW_XMLFLOW_EXCEPTION.


The documentation for this class was generated from the following files:
Generated on Sat Oct 4 13:25:09 2003 for XDFLengine by doxygen1.3-rc2