StreamWriter class. More...
#include <StreamWriter.hpp>
Public Member Functions | |
virtual void | doWrite (size_t bytesToWrite, const char *data, shared_ptr< StreamOperationHandlerMethodBase > streamOperationHandlerWrite) |
Executes a write operation. | |
virtual int | getFileDescriptor () const |
File descriptor getter. | |
virtual void | onWrite (size_t bytesWritten, size_t requestedBytes, const char *data, bool success, shared_ptr< StreamOperationHandlerMethodBase > streamOperationHandlerWrite) |
This method will be called by StreamHandler each time a write event occurs. | |
virtual void | open (ACE_Handler *streamHandler, ACE_Proactor *proactor) |
Opens the device for writing. | |
StreamWriter (Device *device) | |
Constructor. | |
virtual | ~StreamWriter () |
Destructor. |
StreamWriter class.
The class which ultimately executes the write operations
Definition at line 45 of file StreamWriter.hpp.
StreamWriter::StreamWriter | ( | Device * | device | ) |
Constructor.
device | The device on which the write operations will be executed |
Definition at line 41 of file StreamWriter.cpp.
StreamWriter::~StreamWriter | ( | ) | [virtual] |
Destructor.
Definition at line 37 of file StreamWriter.cpp.
void StreamWriter::doWrite | ( | size_t | bytesToWrite, | |
const char * | data, | |||
shared_ptr< StreamOperationHandlerMethodBase > | streamOperationHandlerWrite | |||
) | [virtual] |
Executes a write operation.
bytesToWrite | The number of bytes to write to the device | |
data | The data to be written to the device | |
streamOperationHandlerWrite | The handler which will receive the write reply |
Definition at line 62 of file StreamWriter.cpp.
int StreamWriter::getFileDescriptor | ( | ) | const [virtual] |
void StreamWriter::onWrite | ( | size_t | bytesWritten, | |
size_t | requestedBytes, | |||
const char * | data, | |||
bool | success, | |||
shared_ptr< StreamOperationHandlerMethodBase > | streamOperationHandlerWrite | |||
) | [virtual] |
This method will be called by StreamHandler each time a write event occurs.
bytesWritten | The number of bytes written | |
requestedBytes | The number of bytes requested to be written | |
data | The data written to the device | |
success | TRUE if the write operation was successful, FALSE otherwise |
Definition at line 45 of file StreamWriter.cpp.
void StreamWriter::open | ( | ACE_Handler * | streamHandler, | |
ACE_Proactor * | proactor | |||
) | [virtual] |
Opens the device for writing.
streamHandler | The StreamHandler which handles io results | |
proactor | The proactor instance which will be "in charge" of this StreamWriter |
Definition at line 55 of file StreamWriter.cpp.