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

FILERepr Class Reference

The FILE*-based file representation. More...

#include <FILERepr.hpp>

Inheritance diagram for FILERepr:

Inheritance graph
[legend]
Collaboration diagram for FILERepr:

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Member Functions

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

Protected Attributes

FILE * file
 The file that contain the transactions.
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

The FILE*-based file representation.

This representation is very simple, readable and fast. Our experiments showed, however, that it is still a little bit slower than FDRepr (file descriptor based) representation.

Definition at line 19 of file FILERepr.hpp.


Member Typedef Documentation

typedef FileReprBase::params_t FILERepr::params_t
 

Definition at line 22 of file FILERepr.hpp.


Member Enumeration Documentation

enum FileReprBase::Mode [inherited]
 

Enumerator:
READ 
WRITE 

Definition at line 20 of file FileReprBase.hpp.


Constructor & Destructor Documentation

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

Definition at line 24 of file FILERepr.hpp.

References file, FileReprBase::file_buffer, and FileReprBase::READ.

FILERepr::~FILERepr  )  [inline]
 

Definition at line 52 of file FILERepr.hpp.

References file.


Member Function Documentation

void FILERepr::flush  )  [inline]
 

Reimplemented from FileReprBase.

Definition at line 61 of file FILERepr.hpp.

References file.

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

Reimplemented from FileReprBase.

Definition at line 66 of file FILERepr.hpp.

References file.

void FILERepr::rewind  )  [inline]
 

Reimplemented from FileReprBase.

Definition at line 57 of file FILERepr.hpp.

References file.

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

Reimplemented from FileReprBase.

Definition at line 71 of file FILERepr.hpp.

References file.


Member Data Documentation

FILE* FILERepr::file [protected]
 

The file that contain the transactions.

Definition at line 77 of file FILERepr.hpp.

Referenced by FILERepr(), flush(), readFromFile(), rewind(), writeToFile(), and ~FILERepr().

char* FileReprBase::file_buffer [protected, inherited]
 

the low-level buffer

Definition at line 89 of file FileReprBase.hpp.

Referenced by FDRepr::FDRepr(), FILERepr(), FileReprBase::FileReprBase(), FDRepr::flush(), StreamRepr::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().

Mode FileReprBase::mode [protected, inherited]
 

operating mode

Definition at line 93 of file FileReprBase.hpp.

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


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