mermaid::support::io::StreamWriter Class Reference

StreamWriter class. More...

#include <StreamWriter.hpp>

Collaboration diagram for mermaid::support::io::StreamWriter:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

StreamWriter class.

The class which ultimately executes the write operations

Author:
Joao Carreira

Definition at line 45 of file StreamWriter.hpp.


Constructor & Destructor Documentation

StreamWriter::StreamWriter ( Device device  ) 

Constructor.

Parameters:
device The device on which the write operations will be executed
Author:
Joao Carreira

Definition at line 41 of file StreamWriter.cpp.

StreamWriter::~StreamWriter (  )  [virtual]

Destructor.

Author:
Joao Carreira

Definition at line 37 of file StreamWriter.cpp.


Member Function Documentation

void StreamWriter::doWrite ( size_t  bytesToWrite,
const char *  data,
shared_ptr< StreamOperationHandlerMethodBase streamOperationHandlerWrite 
) [virtual]

Executes a write operation.

Parameters:
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
Author:
Joao Carreira

Definition at line 62 of file StreamWriter.cpp.

int StreamWriter::getFileDescriptor (  )  const [virtual]

File descriptor getter.

Returns:
The file descriptor
Author:
Joao Carreira

Definition at line 50 of file StreamWriter.cpp.

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.

Parameters:
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
Author:
Joao Carreira

Definition at line 45 of file StreamWriter.cpp.

void StreamWriter::open ( ACE_Handler *  streamHandler,
ACE_Proactor *  proactor 
) [virtual]

Opens the device for writing.

Parameters:
streamHandler The StreamHandler which handles io results
proactor The proactor instance which will be "in charge" of this StreamWriter
Author:
Joao Carreira

Definition at line 55 of file StreamWriter.cpp.

Generated on Fri Mar 4 22:15:48 2011 for MeRMaID::support by  doxygen 1.6.3