StreamReader class. More...
#include <StreamReader.hpp>
Public Member Functions | |
virtual void | doRead () |
Executes a read operation. | |
virtual int | getFileDescriptor () const |
File descriptor getter. | |
virtual void | onRead (size_t bytesRead, size_t requestedBytesRead, const char *data, bool success) |
This method will be called by StreamHandler each time a read event occurs. | |
virtual void | open (ACE_Handler *streamHandler, ACE_Proactor *proactor) |
Opens the device for reading. | |
StreamReader (Device *device) | |
Constructor. | |
virtual | ~StreamReader () |
Destructor. |
StreamReader class.
The class which ultimately executes the read operations
Definition at line 45 of file StreamReader.hpp.
StreamReader::StreamReader | ( | Device * | device | ) |
Constructor.
device | The device on which the read operations will be executed |
Definition at line 40 of file StreamReader.cpp.
StreamReader::~StreamReader | ( | ) | [virtual] |
Destructor.
Definition at line 35 of file StreamReader.cpp.
void StreamReader::doRead | ( | ) | [virtual] |
Executes a read operation.
Definition at line 57 of file StreamReader.cpp.
virtual int mermaid::support::io::StreamReader::getFileDescriptor | ( | ) | const [inline, virtual] |
void StreamReader::onRead | ( | size_t | bytesRead, | |
size_t | requestedBytesRead, | |||
const char * | data, | |||
bool | success | |||
) | [virtual] |
This method will be called by StreamHandler each time a read event occurs.
bytesRead | The number of bytes read | |
requestedBytesRead | The number of bytes requested to be read | |
data | The data read from the device | |
success | TRUE if the read operation was successful, FALSE otherwise |
Definition at line 44 of file StreamReader.cpp.
void StreamReader::open | ( | ACE_Handler * | streamHandler, | |
ACE_Proactor * | proactor | |||
) | [virtual] |
Opens the device for reading.
streamHandler | The StreamHandler which handles io results | |
proactor | The proactor instance which will be "in charge" of this StreamReader |
Definition at line 50 of file StreamReader.cpp.