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

FileBuffer Class Reference

#include <filebuffer.hpp>

Inheritance diagram for FileBuffer:

Inheritance graph
[legend]
Collaboration diagram for FileBuffer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements a XMLStreamBuffer using temporary files.

Definition at line 54 of file filebuffer.hpp.

Public Methods

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

 ~FileBuffer ()
 Destructor.

XMLStreamProvideroperator>> (XMLStreamConsumer &p_pStreamConsumer)
void writeData (const char *p_pszData, unsigned int p_uiDataLen)
bool commitStream (bool fFinal=false)
void flush ()
 Empties the buffer.
If the buffer is readonly, nothing is done.



Static Public Methods

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


Constructor & Destructor Documentation

FileBuffer::FileBuffer 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 63 of file filebuffer.cpp.

References DEBUG_CREATE, FILEBUFFER_COPYBUF, and flush().

FileBuffer::~FileBuffer  
 

Destructor.

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

Definition at line 95 of file filebuffer.cpp.

References DEBUG_DEL, and DEBUG_ECHO.


Member Function Documentation

bool FileBuffer::commitStream bool    fFinal = false [virtual]
 

Reimplemented from XMLStreamConsumer.

Definition at line 201 of file filebuffer.cpp.

Referenced by FSSetStreamer::commitStream().

void FileBuffer::flush  
 

Empties the buffer.
If the buffer is readonly, nothing is done.

Definition at line 219 of file filebuffer.cpp.

References DEBUG_FUNC.

Referenced by FileBuffer(), and FSSetStreamer::initStream().

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

Implements XMLStreamProvider.

Definition at line 111 of file filebuffer.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 FileBuffer::setTmpDir const char *    p_pszTmpDir [static]
 

Sets temporary directory.

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

Definition at line 54 of file filebuffer.cpp.

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

Implements XMLStreamConsumer.

Definition at line 175 of file filebuffer.cpp.

References DEBUG_FUNC, and THROW_XMLFLOW_EXCEPTION.


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