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

ACE_POSIX_Asynch_Write_File_Result Class Reference

This class provides implementation for <ACE_Asynch_Write_File_Result> for POSIX platforms. More...

#include <POSIX_Asynch_IO.h>

Inheritance diagram for ACE_POSIX_Asynch_Write_File_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_Asynch_Write_File_Result:

Collaboration graph
[legend]
List of all members.

Protected Methods

 ACE_POSIX_Asynch_Write_File_Result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, u_long offset, u_long offset_high, ACE_HANDLE event, int priority, int signal_number)
 Constructor is protected since creation is limited to ACE_Asynch_Write_File factory. More...

virtual void complete (size_t bytes_transferred, int success, const void *completion_key, u_long error)
 ACE_Proactor will call this method when the write completes. More...

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


Friends

class ACE_POSIX_Asynch_Write_File
 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 implementation for <ACE_Asynch_Write_File_Result> for POSIX platforms.

This class has all the information necessary for the <handler> to uniquiely identify the completion of the asynchronous write.

This class differs slightly from <ACE_Asynch_Write_Stream::Result> as it calls back <ACE_Handler::handle_write_file> on the <handler> instead of <ACE_Handler::handle_write_stream>. No additional state is required by this class as <ACE_Asynch_Result> can store the <offset>.

Definition at line 499 of file POSIX_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_POSIX_Asynch_Write_File_Result::ACE_POSIX_Asynch_Write_File_Result ACE_Handler   handler,
ACE_HANDLE    handle,
ACE_Message_Block   message_block,
size_t    bytes_to_write,
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_Write_File factory.

Definition at line 586 of file POSIX_Asynch_IO.cpp.

00596   : ACE_Asynch_Result_Impl (),
00597     ACE_Asynch_Write_Stream_Result_Impl (),
00598     ACE_Asynch_Write_File_Result_Impl (),
00599     ACE_POSIX_Asynch_Write_Stream_Result (handler,
00600                                           handle,
00601                                           message_block,
00602                                           bytes_to_write,
00603                                           act,
00604                                           event,
00605                                           priority,
00606                                           signal_number)
00607 {
00608   this->aio_offset = offset;
00609   //
00610   // @@ Support offset_high with aiocb64.
00611   //
00612   ACE_UNUSED_ARG (offset_high);
00613 }

ACE_POSIX_Asynch_Write_File_Result::~ACE_POSIX_Asynch_Write_File_Result void    [protected, virtual]
 

Destructor.

Definition at line 640 of file POSIX_Asynch_IO.cpp.

00641 {
00642 }


Member Function Documentation

void ACE_POSIX_Asynch_Write_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 write completes.

Reimplemented from ACE_POSIX_Asynch_Write_Stream_Result.

Definition at line 616 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_write_file, ACE_POSIX_Asynch_Result::handler_, ACE_POSIX_Asynch_Write_Stream_Result::message_block_, ACE_Message_Block::rd_ptr, ACE_POSIX_Asynch_Result::success, and ACE_POSIX_Asynch_Result::success_.

00620 {
00621   // Copy the data.
00622   this->bytes_transferred_ = bytes_transferred;
00623   this->success_ = success;
00624   this->completion_key_ = completion_key;
00625   this->error_ = error;
00626 
00627   // <error> is available in <aio_resultp.aio_error>
00628   ACE_UNUSED_ARG (error);
00629 
00630   // Appropriately move the pointers in the message block.
00631   this->message_block_.rd_ptr (bytes_transferred);
00632 
00633   // Create the interface result class.
00634   ACE_Asynch_Write_File::Result result (this);
00635 
00636   // Call the application handler.
00637   this->handler_.handle_write_file (result);
00638 }


Friends And Related Function Documentation

friend class ACE_POSIX_Asynch_Write_File [friend]
 

Factory classes will have special permissions.

Definition at line 503 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_Write_Stream_Result.

Definition at line 506 of file POSIX_Asynch_IO.h.


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