ACE_POSIX_Asynch_Write_File Class Reference

#include <POSIX_Asynch_IO.h>

Inheritance diagram for ACE_POSIX_Asynch_Write_File:

Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_Asynch_Write_File:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_POSIX_Asynch_Write_File (ACE_POSIX_Proactor *posix_proactor)
 Constructor.

int write (ACE_Message_Block &message_block, size_t bytes_to_write, u_long offset, u_long offset_high, const void *act, int priority, int signal_number=0)
virtual ~ACE_POSIX_Asynch_Write_File (void)
 Destructor.


Private Member Functions

int write (ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, int priority, int signal_number=0)

Detailed Description

This class provides concrete implementation for for POSIX platforms where the completion strategy for Proactor is based on AIOCB (AIO Control Blocks).

Definition at line 548 of file POSIX_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_POSIX_Asynch_Write_File::ACE_POSIX_Asynch_Write_File ACE_POSIX_Proactor posix_proactor  ) 
 

Constructor.

Definition at line 638 of file POSIX_Asynch_IO.cpp.

00639   : ACE_POSIX_Asynch_Write_Stream (posix_proactor)
00640 {
00641 }

ACE_POSIX_Asynch_Write_File::~ACE_POSIX_Asynch_Write_File void   )  [virtual]
 

Destructor.

Definition at line 685 of file POSIX_Asynch_IO.cpp.

00686 {
00687 }


Member Function Documentation

int ACE_POSIX_Asynch_Write_File::write ACE_Message_Block message_block,
size_t  bytes_to_write,
const void *  act,
int  priority,
int  signal_number = 0
[private, virtual]
 

This belongs to ACE_POSIX_Asynch_Write_Stream. We have put this here to avoid compiler warnings. We forward this method call to the <ACE_POSIX_Asynch_Write_Stream::write> one.

Implements ACE_Asynch_Write_File_Impl.

Definition at line 690 of file POSIX_Asynch_IO.cpp.

References ACE_POSIX_Asynch_Write_Stream::write().

00695 {
00696   return ACE_POSIX_Asynch_Write_Stream::write (message_block,
00697                                                      bytes_to_write,
00698                                                      act,
00699                                                      priority,
00700                                                      signal_number);
00701 }

int ACE_POSIX_Asynch_Write_File::write ACE_Message_Block message_block,
size_t  bytes_to_write,
u_long  offset,
u_long  offset_high,
const void *  act,
int  priority,
int  signal_number = 0
[virtual]
 

This starts off an asynchronous write. Upto will be written and stored in the . The write will start at from the beginning of the file.

Implements ACE_Asynch_Write_File_Impl.

Definition at line 644 of file POSIX_Asynch_IO.cpp.

References ACE_ERROR_RETURN, ACE_LIB_TEXT, ACE_NEW_RETURN, ACE_POSIX_Proactor::get_handle(), ACE_Message_Block::length(), LM_ERROR, ACE_POSIX_Asynch_Operation::posix_proactor(), and ACE_POSIX_Proactor::start_aio().

00651 {
00652   size_t len = message_block.length ();
00653   if (bytes_to_write > len)
00654      bytes_to_write = len;
00655 
00656   if (bytes_to_write == 0)
00657     ACE_ERROR_RETURN
00658       ((LM_ERROR,
00659         ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_File::write:")
00660         ACE_LIB_TEXT ("Attempt to write 0 bytes\n")),
00661       -1);
00662 
00663   ACE_POSIX_Asynch_Write_File_Result *result = 0;
00664   ACE_POSIX_Proactor *proactor = this->posix_proactor ();
00665   ACE_NEW_RETURN (result,
00666                   ACE_POSIX_Asynch_Write_File_Result (this->handler_proxy_,
00667                                                       this->handle_,
00668                                                       message_block,
00669                                                       bytes_to_write,
00670                                                       act,
00671                                                       offset,
00672                                                       offset_high,
00673                                                       proactor->get_handle (),
00674                                                       priority,
00675                                                       signal_number),
00676                   -1);
00677 
00678   int return_val = proactor->start_aio (result, ACE_POSIX_Proactor::ACE_OPCODE_WRITE);
00679   if (return_val == -1)
00680     delete result;
00681 
00682   return return_val;
00683 }


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