mermaid::support::io::IOThread Class Reference

IOThread class. More...

#include <IOThread.hpp>

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

List of all members.

Public Member Functions

virtual void addCloseOperation (int fileDescriptor, bool writeEnabled, bool readEnabled)
 Creates and adds a CloseTask to be run in the IOThread.
virtual void addStreamReader (shared_ptr< StreamReader > streamReader)
 Add a StreamReader object.
virtual void addStreamWriter (shared_ptr< StreamWriter > streamWriter)
 Add a StreamWriter object.
virtual void addWriteOperation (int fileDescriptor, size_t bytesToWrite, const char *data, shared_ptr< StreamOperationHandlerMethodBase > streamOperationHandlerWrite)
 Creates and adds a WriteTask to be run in the IOThread.
shared_ptr< ActiveObjectgetActiveObject ()
 Active Object getter.
virtual ACE_Proactor * getProactor ()
 ACE_Proactor getter.
 IOThread ()
 Constructor.
virtual void run ()
 Run the event loop.
virtual ~IOThread ()
 Destructor.

Friends

class AddStreamReaderTask
class AddStreamWriterTask
class CloseTask
class IOThreadUpdateTask
class WriteTask

Detailed Description

IOThread class.

A separate context of execution that 'waits' for device events (read/write operations completed) and handles them.

Author:
Joao Carreira

Definition at line 54 of file IOThread.hpp.


Constructor & Destructor Documentation

IOThread::IOThread (  ) 

Constructor.

Author:
Joao Carreira

Definition at line 47 of file IOThread.cpp.

IOThread::~IOThread (  )  [virtual]

Destructor.

Author:
Joao Carreira

Definition at line 43 of file IOThread.cpp.


Member Function Documentation

void IOThread::addCloseOperation ( int  fileDescriptor,
bool  writeEnabled,
bool  readEnabled 
) [virtual]

Creates and adds a CloseTask to be run in the IOThread.

Parameters:
fileDescriptor The file descriptor which will be closed
Author:
Joao Carreira

Definition at line 73 of file IOThread.cpp.

void IOThread::addStreamReader ( shared_ptr< StreamReader streamReader  )  [virtual]

Add a StreamReader object.

This method adds a StreamReader object to the IOThread. This turns on reading for the StreamReader's device.

Parameters:
streamReader StreamReader object to add to the IOThread
Author:
Joao Carreira

Definition at line 55 of file IOThread.cpp.

void IOThread::addStreamWriter ( shared_ptr< StreamWriter streamWriter  )  [virtual]

Add a StreamWriter object.

This method adds a StreamWriter object to the IOThread. This makes the StreamWriter's device available to write.

Parameters:
streamWriter StreamWriter object to add to the IOThread
Author:
Joao Carreira

Definition at line 61 of file IOThread.cpp.

void IOThread::addWriteOperation ( int  fileDescriptor,
size_t  bytesToWrite,
const char *  data,
shared_ptr< StreamOperationHandlerMethodBase streamOperationHandlerWrite 
) [virtual]

Creates and adds a WriteTask to be run in the IOThread.

Parameters:
fileDescriptor The file descriptor to which the write will be done
bytesToWrite The number of bytes to be written
data The data to be written
streamOperationHandlerWrite The handler which will receive the write reply
Author:
Joao Carreira

Definition at line 67 of file IOThread.cpp.

shared_ptr<ActiveObject> mermaid::support::io::IOThread::getActiveObject (  )  [inline]

Active Object getter.

Returns:
The IOThread's active object
Author:
Joao Carreira

Definition at line 130 of file IOThread.hpp.

ACE_Proactor * IOThread::getProactor (  )  [virtual]

ACE_Proactor getter.

Returns:
ACE_Proactor instance
Author:
Joao Carreira

Definition at line 97 of file IOThread.cpp.

void IOThread::run (  )  [virtual]

Run the event loop.

This method runs the proactor event loop which handles the io events (read and write replies)

Author:
Joao Carreira

Definition at line 79 of file IOThread.cpp.

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