rpa::fd_ctrl Class Reference

List of all members.

Public Member Functions

 fd_ctrl (int aFilDes, const visitor &aVisit, size_t aBufSz)
bool not_empty (void) const

Private Attributes

bool _notEmpty

Detailed Description

Controls the iteration on a int file descriptor to read all data from the beginning to the current file position.


Constructor & Destructor Documentation

rpa::fd_ctrl::fd_ctrl ( int  aFilDes,
const visitor aVisit,
size_t  aBufSz 
) [inline]

This receive as parameter, an int file descriptor, and a visitor. This will read data from the file descriptor, in a loop, and pass each segment to the visitor.

Now we need a buffer for read/write cycles. This will be automatically freed if an exception is thrown.

Beware that the file position type might be different than size_t, if the files are 64 bits large.

If mispredict, this is an IO error.


Member Function Documentation

bool rpa::fd_ctrl::not_empty ( void   )  const [inline]

Tells whether data was written or not. It is used to deduce whether it is necessary to clean up the input or not.


Member Data Documentation

bool rpa::fd_ctrl::_notEmpty [private]


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:38 2007 for rpa by  doxygen 1.4.7