Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

StreamRepr Class Reference

Stream-based file representation. More...

#include <StreamRepr.hpp>

Inheritance diagram for StreamRepr:

Inheritance graph
[legend]
Collaboration diagram for StreamRepr:

Collaboration graph
[legend]
List of all members.

Public Types

typedef FileReprBase::params_t params_t
enum  Mode { READ, WRITE }

Public Member Functions

 StreamRepr (const params_t *par) throw (std::ios_base::failure)
 ~StreamRepr ()
void rewind ()
void flush ()
std::streamsize readFromFile (char *buffer, std::streamsize buffer_size)
void writeToFile (const char *str, std::streamsize n)

Protected Attributes

std::ifstream input_stream
 stream to read
std::ofstream output_stream
 steam to write
char * file_buffer
 the low-level buffer
std::streamsize file_buffer_size
 the size of the lowest level buffer
Mode mode
 operating mode

Detailed Description

Stream-based file representation.

This is the simplest, but also the slowest file representation.

Definition at line 18 of file StreamRepr.hpp.


Member Typedef Documentation

typedef FileReprBase::params_t StreamRepr::params_t
 

Reimplemented in SimpleAssocRuleWriter, SimpleOutput, DecoderBase< BufferedNormalOutput< StreamRepr > >, SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >, BufferedNormalOutput< StreamRepr >, and OutputBase< StreamRepr >.

Definition at line 21 of file StreamRepr.hpp.


Member Enumeration Documentation

enum FileReprBase::Mode [inherited]
 

Enumerator:
READ 
WRITE 

Definition at line 20 of file FileReprBase.hpp.


Constructor & Destructor Documentation

StreamRepr::StreamRepr const params_t par  )  throw (std::ios_base::failure) [inline]
 

Definition at line 23 of file StreamRepr.hpp.

References FileReprBase::file_buffer, input_stream, output_stream, and FileReprBase::READ.

StreamRepr::~StreamRepr  )  [inline]
 

Definition at line 50 of file StreamRepr.hpp.

References input_stream, and output_stream.


Member Function Documentation

void StreamRepr::flush  )  [inline]
 

Reimplemented from FileReprBase.

Definition at line 63 of file StreamRepr.hpp.

References output_stream.

std::streamsize StreamRepr::readFromFile char *  buffer,
std::streamsize  buffer_size
[inline]
 

Reimplemented from FileReprBase.

Definition at line 68 of file StreamRepr.hpp.

References input_stream.

void StreamRepr::rewind  )  [inline]
 

Reimplemented from FileReprBase.

Definition at line 58 of file StreamRepr.hpp.

References input_stream.

void StreamRepr::writeToFile const char *  str,
std::streamsize  n
[inline]
 

Reimplemented from FileReprBase.

Definition at line 72 of file StreamRepr.hpp.

References output_stream.


Member Data Documentation

char* FileReprBase::file_buffer [protected, inherited]
 

the low-level buffer

Definition at line 89 of file FileReprBase.hpp.

Referenced by FDRepr::FDRepr(), FILERepr::FILERepr(), FileReprBase::FileReprBase(), FDRepr::flush(), StreamRepr(), FDRepr::writeToFile(), and FileReprBase::~FileReprBase().

std::streamsize FileReprBase::file_buffer_size [protected, inherited]
 

the size of the lowest level buffer

Definition at line 91 of file FileReprBase.hpp.

Referenced by FDRepr::FDRepr(), and FDRepr::flush().

std::ifstream StreamRepr::input_stream [protected]
 

stream to read

Definition at line 78 of file StreamRepr.hpp.

Referenced by SimpleTransactionReader::getNextItem(), SimpleTransactionReader::nextTransactionBIS(), SimpleTransactionReader::nextTransactionUAC(), readFromFile(), rewind(), StreamRepr(), and ~StreamRepr().

Mode FileReprBase::mode [protected, inherited]
 

operating mode

Definition at line 93 of file FileReprBase.hpp.

Referenced by SimpleOutputTester::doTest(), FileReprBase::FileReprBase(), and FDRepr::~FDRepr().

std::ofstream StreamRepr::output_stream [protected]
 

steam to write

Definition at line 80 of file StreamRepr.hpp.

Referenced by flush(), StreamRepr(), SimpleAssocRuleWriter::writeAssocRule(), SimpleOutput::writeItemsetAndCounter(), writeToFile(), and ~StreamRepr().


The documentation for this class was generated from the following file:
Generated on Sun Sep 17 17:55:40 2006 for FIM environment by  doxygen 1.4.4