Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PlainRopeReader Class Reference

#include <PlainFile.h>

Inheritance diagram for PlainRopeReader:

Inheritance graph
[legend]
Collaboration diagram for PlainRopeReader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PlainRopeReader (SH::SinkEndpoint *pull_here, size_t bufmax=4096)
virtual ~PlainRopeReader ()
int getByte ()
virtual bool eof () const
SH::SinkEndpointep () const

Constructor & Destructor Documentation

PlainRopeReader::PlainRopeReader SH::SinkEndpoint pull_here,
size_t  bufmax = 4096
 

The PlainFile does not make an assumption whether the file descriptor is blocking or non-blocking. If it is non-blocking without any data to read, it will return an error. The file descriptor is not considered owned by the PlainFile object, ie. it will not be discarded on deletion of the object. However, no implications about the number of read or unread bytes must be made by the calling application.

Parameters:
fd file descriptor to read from
bufmax optional size of the dynamically allocated buffer

virtual PlainRopeReader::~PlainRopeReader  )  [virtual]
 

Destructor.


Member Function Documentation

virtual bool PlainRopeReader::eof  )  const [virtual]
 

If the file descriptor refers to a blocking file, this function can be used by the application to determine whether the end of file has been reached. In case of non-blocking operation, the function is meaningless.

Returns:
True if the read operation has returned 0 bytes, false otherwise.

SH::SinkEndpoint* PlainRopeReader::ep  )  const
 

Retrieves the current file descriptor.

Returns:
the current file descriptor

int PlainRopeReader::getByte  )  [virtual]
 

Gets a byte from the given file.

Returns:
a byte value in the range 0x00 - 0xff or -1 in case of error.

Implements PlainReader.


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:06 2005 for Komssys by doxygen 1.3.8