Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_POSIX_Asynch_Read_Stream_Result Class Reference

This class provides concrete implementation for <ACE_Asynch_Read_Stream::Result> class for POSIX platforms. More...

#include <POSIX_Asynch_IO.h>

Inheritance diagram for ACE_POSIX_Asynch_Read_Stream_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_Asynch_Read_Stream_Result:

Collaboration graph
[legend]
List of all members.

Public Methods

size_t bytes_to_read (void) const
 The number of bytes which were requested at the start of the asynchronous read. More...

ACE_Message_Blockmessage_block (void) const
 Message block which contains the read data. More...

ACE_HANDLE handle (void) const
 I/O handle used for reading. More...


Protected Methods

 ACE_POSIX_Asynch_Read_Stream_Result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, ACE_HANDLE event, int priority, int signal_number)
virtual void complete (size_t bytes_transferred, int success, const void *completion_key, u_long error)
 Get the data copied to this class, before calling application handler. More...

virtual ~ACE_POSIX_Asynch_Read_Stream_Result (void)
 Destructor. More...


Protected Attributes

ACE_Message_Blockmessage_block_
 Message block for reading the data into. More...


Friends

class ACE_POSIX_Asynch_Read_Stream
 Factory classes will have special permissions. More...

class ACE_POSIX_Proactor
 The Proactor constructs the Result class for faking results. More...


Detailed Description

This class provides concrete implementation for <ACE_Asynch_Read_Stream::Result> class for POSIX platforms.

Definition at line 218 of file POSIX_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_POSIX_Asynch_Read_Stream_Result::ACE_POSIX_Asynch_Read_Stream_Result ACE_Handler   handler,
ACE_HANDLE    handle,
ACE_Message_Block   message_block,
size_t    bytes_to_read,
const void *    act,
ACE_HANDLE    event,
int    priority,
int    signal_number
[protected]
 

Definition at line 234 of file POSIX_Asynch_IO.cpp.

References bytes_to_read, ACE_POSIX_Asynch_Result::event, handle, and ACE_Message_Block::wr_ptr.

00242   : ACE_Asynch_Result_Impl (),
00243     ACE_Asynch_Read_Stream_Result_Impl (),
00244     ACE_POSIX_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
00245     message_block_ (message_block)
00246 {
00247   this->aio_fildes = handle;
00248   this->aio_buf = message_block.wr_ptr ();
00249   this->aio_nbytes = bytes_to_read;
00250   ACE_UNUSED_ARG (event);
00251 }

ACE_POSIX_Asynch_Read_Stream_Result::~ACE_POSIX_Asynch_Read_Stream_Result void    [protected, virtual]
 

Destructor.

Definition at line 277 of file POSIX_Asynch_IO.cpp.

00278 {
00279 }


Member Function Documentation

size_t ACE_POSIX_Asynch_Read_Stream_Result::bytes_to_read void    const [virtual]
 

The number of bytes which were requested at the start of the asynchronous read.

Implements ACE_Asynch_Read_Stream_Result_Impl.

Definition at line 217 of file POSIX_Asynch_IO.cpp.

Referenced by ACE_POSIX_Asynch_Read_Stream_Result.

00218 {
00219   return this->aio_nbytes;
00220 }

void ACE_POSIX_Asynch_Read_Stream_Result::complete size_t    bytes_transferred,
int    success,
const void *    completion_key,
u_long    error
[protected, virtual]
 

Get the data copied to this class, before calling application handler.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_POSIX_Asynch_Read_File_Result.

Definition at line 254 of file POSIX_Asynch_IO.cpp.

References ACE_POSIX_Asynch_Result::bytes_transferred, ACE_POSIX_Asynch_Result::bytes_transferred_, ACE_POSIX_Asynch_Result::completion_key, ACE_POSIX_Asynch_Result::completion_key_, ACE_POSIX_Asynch_Result::error, ACE_POSIX_Asynch_Result::error_, ACE_Handler::handle_read_stream, ACE_POSIX_Asynch_Result::handler_, message_block_, ACE_POSIX_Asynch_Result::success, ACE_POSIX_Asynch_Result::success_, and ACE_Message_Block::wr_ptr.

00258 {
00259   this->bytes_transferred_ = bytes_transferred;
00260   this->success_ = success;
00261   this->completion_key_ = completion_key;
00262   this->error_ = error;
00263 
00264   // <errno> is available in the aiocb.
00265   ACE_UNUSED_ARG (error);
00266 
00267   // Appropriately move the pointers in the message block.
00268   this->message_block_.wr_ptr (bytes_transferred);
00269 
00270   // Create the interface result class.
00271   ACE_Asynch_Read_Stream::Result result (this);
00272 
00273   // Call the application handler.
00274   this->handler_.handle_read_stream (result);
00275 }

ACE_HANDLE ACE_POSIX_Asynch_Read_Stream_Result::handle void    const [virtual]
 

I/O handle used for reading.

Implements ACE_Asynch_Read_Stream_Result_Impl.

Definition at line 229 of file POSIX_Asynch_IO.cpp.

Referenced by ACE_POSIX_Asynch_Read_Stream_Result.

00230 {
00231   return this->aio_fildes;
00232 }

ACE_Message_Block & ACE_POSIX_Asynch_Read_Stream_Result::message_block void    const [virtual]
 

Message block which contains the read data.

Implements ACE_Asynch_Read_Stream_Result_Impl.

Definition at line 223 of file POSIX_Asynch_IO.cpp.

References message_block_.

00224 {
00225   return this->message_block_;
00226 }


Friends And Related Function Documentation

friend class ACE_POSIX_Asynch_Read_Stream [friend]
 

Factory classes will have special permissions.

Definition at line 223 of file POSIX_Asynch_IO.h.

friend class ACE_POSIX_Proactor [friend]
 

The Proactor constructs the Result class for faking results.

Reimplemented in ACE_POSIX_Asynch_Read_File_Result.

Definition at line 226 of file POSIX_Asynch_IO.h.


Member Data Documentation

ACE_Message_Block& ACE_POSIX_Asynch_Read_Stream_Result::message_block_ [protected]
 

Message block for reading the data into.

Definition at line 265 of file POSIX_Asynch_IO.h.

Referenced by ACE_POSIX_Asynch_Read_File_Result::complete, complete, and message_block.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:53:05 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002