ACE_POSIX_Asynch_Read_File_Result Class Reference

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

#include <POSIX_Asynch_IO.h>

Inheritance diagram for ACE_POSIX_Asynch_Read_File_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_Asynch_Read_File_Result:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

 ACE_POSIX_Asynch_Read_File_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, u_long offset, u_long offset_high, ACE_HANDLE event, int priority, int signal_number)
virtual void complete (size_t bytes_transferred, int success, const void *completion_key, u_long error)
 ACE_Proactor will call this method when the read completes.

virtual ~ACE_POSIX_Asynch_Read_File_Result (void)
 Destructor.


Friends

class ACE_POSIX_Asynch_Read_File
 Factory classes will have special permissions.

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


Detailed Description

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

Definition at line 400 of file POSIX_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_POSIX_Asynch_Read_File_Result::ACE_POSIX_Asynch_Read_File_Result const ACE_Handler::Proxy_Ptr handler_proxy,
ACE_HANDLE  handle,
ACE_Message_Block message_block,
size_t  bytes_to_read,
const void *  act,
u_long  offset,
u_long  offset_high,
ACE_HANDLE  event,
int  priority,
int  signal_number
[protected]
 

Constructor is protected since creation is limited to ACE_Asynch_Read_File factory.

Definition at line 452 of file POSIX_Asynch_IO.cpp.

References ACE_Handler::Proxy_Ptr.

00462   : ACE_POSIX_Asynch_Read_Stream_Result (handler_proxy,
00463                                          handle,
00464                                          message_block,
00465                                          bytes_to_read,
00466                                          act,
00467                                          event,
00468                                          priority,
00469                                          signal_number)
00470 {
00471   this->aio_offset = offset;
00472   //
00473   // @@ Use aiocb64??
00474   //
00475   ACE_UNUSED_ARG (offset_high);
00476 }

ACE_POSIX_Asynch_Read_File_Result::~ACE_POSIX_Asynch_Read_File_Result void   )  [protected, virtual]
 

Destructor.

Definition at line 505 of file POSIX_Asynch_IO.cpp.

References ~ACE_POSIX_Asynch_Read_File_Result().

Referenced by ~ACE_POSIX_Asynch_Read_File_Result().

00506 {
00507 }


Member Function Documentation

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

ACE_Proactor will call this method when the read completes.

Reimplemented from ACE_POSIX_Asynch_Read_Stream_Result.

Definition at line 479 of file POSIX_Asynch_IO.cpp.

References complete(), ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), ACE_Handler::handle_read_file(), and ACE_Message_Block::wr_ptr().

Referenced by complete().

00483 {
00484   // Copy all the data.
00485   this->bytes_transferred_ = bytes_transferred;
00486   this->success_ = success;
00487   this->completion_key_ = completion_key;
00488   this->error_ = error;
00489 
00490   // <errno> is available in the aiocb.
00491   ACE_UNUSED_ARG (error);
00492 
00493   // Appropriately move the pointers in the message block.
00494   this->message_block_.wr_ptr (bytes_transferred);
00495 
00496   // Create the interface result class.
00497   ACE_Asynch_Read_File::Result result (this);
00498 
00499   // Call the application handler.
00500   ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
00501   if (handler != 0)
00502     handler->handle_read_file (result);
00503 }


Friends And Related Function Documentation

friend class ACE_POSIX_Asynch_Read_File [friend]
 

Factory classes will have special permissions.

Definition at line 404 of file POSIX_Asynch_IO.h.

friend class ACE_POSIX_Proactor [friend]
 

The Proactor constructs the Result class for faking results.

Reimplemented from ACE_POSIX_Asynch_Read_Stream_Result.

Definition at line 407 of file POSIX_Asynch_IO.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:26:42 2006 for ACE by doxygen 1.3.6