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

ACE_WIN32_Asynch_Result Class Reference

An abstract class which adds information to the OVERLAPPED structure to make it more useful. More...

#include <WIN32_Asynch_IO.h>

Inheritance diagram for ACE_WIN32_Asynch_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_WIN32_Asynch_Result:

Collaboration graph
[legend]
List of all members.

Public Methods

size_t bytes_transferred (void) const
 Number of bytes transferred by the operation. More...

const void * act (void) const
 ACT associated with the operation. More...

int success (void) const
 Did the operation succeed? More...

const void * completion_key (void) const
u_long error (void) const
 Error value if the operation fail. More...

ACE_HANDLE event (void) const
 Event associated with the OVERLAPPED structure. More...

u_long offset (void) const
 This really make sense only when doing file I/O. More...

u_long offset_high (void) const
 Offset_high associated with the OVERLAPPED structure. More...

int priority (void) const
 The priority of the asynchronous operation. Currently, this is not supported on Win32. More...

int signal_number (void) const
 Returns 0. More...

int post_completion (ACE_Proactor_Impl *proactor)
 Post <this> to the Proactor's completion port. More...

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

void set_error (u_long errcode)
 Simulate error value to use in the post_completion (). More...

void set_bytes_transferred (size_t nbytes)
 Simulate value to use in the post_completion (). More...


Protected Methods

 ACE_WIN32_Asynch_Result (ACE_Handler &handler, const void *act, ACE_HANDLE event, u_long offset, u_long offset_high, int priority, int signal_number=0)
 Constructor. More...


Protected Attributes

ACE_Handlerhandler_
 Handler that will be called back. More...

const void * act_
 ACT for this operation. More...

size_t bytes_transferred_
 Bytes transferred by this operation. More...

int success_
 Success indicator. More...

const void * completion_key_
 ACT associated with handle. More...

u_long error_
 Error if operation failed. More...


Friends

class ACE_WIN32_Asynch_Accept
 Factory class has special permissions. More...

class ACE_WIN32_Proactor
 Proactor class has special permission. More...


Detailed Description

An abstract class which adds information to the OVERLAPPED structure to make it more useful.

An abstract base class from which you can obtain some basic information like the number of bytes transferred, the ACT associated with the asynchronous operation, indication of success or failure, etc. Subclasses may want to store more information that is particular to the asynchronous operation it represents.

Definition at line 60 of file WIN32_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_WIN32_Asynch_Result::~ACE_WIN32_Asynch_Result void    [virtual]
 

Destructor.

Definition at line 104 of file WIN32_Asynch_IO.cpp.

00105 {
00106 }

ACE_WIN32_Asynch_Result::ACE_WIN32_Asynch_Result ACE_Handler   handler,
const void *    act,
ACE_HANDLE    event,
u_long    offset,
u_long    offset_high,
int    priority,
int    signal_number = 0
[protected]
 

Constructor.

Definition at line 108 of file WIN32_Asynch_IO.cpp.

References event, offset, offset_high, priority, and signal_number.

00115   : ACE_Asynch_Result_Impl (),
00116     OVERLAPPED (),
00117     handler_ (handler),
00118     act_ (act),
00119     bytes_transferred_ (0),
00120     success_ (0),
00121     completion_key_ (0),
00122     error_ (0)
00123 {
00124   // Set the ACE_OVERLAPPED structure
00125   this->Internal = 0;
00126   this->InternalHigh = 0;
00127   this->Offset = offset;
00128   this->OffsetHigh = offset_high;
00129   this->hEvent = event;
00130 
00131   ACE_UNUSED_ARG (priority);
00132   ACE_UNUSED_ARG (signal_number);
00133 }


Member Function Documentation

const void * ACE_WIN32_Asynch_Result::act void    const [virtual]
 

ACT associated with the operation.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 23 of file WIN32_Asynch_IO.cpp.

References act_.

Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::act, ACE_WIN32_Asynch_Read_Dgram_Result::act, ACE_WIN32_Asynch_Transmit_File_Result::act, ACE_WIN32_Asynch_Connect_Result::act, ACE_WIN32_Asynch_Accept_Result::act, ACE_WIN32_Asynch_Write_File_Result::act, ACE_WIN32_Asynch_Read_File_Result::act, ACE_WIN32_Asynch_Write_Stream_Result::act, and ACE_WIN32_Asynch_Read_Stream_Result::act.

00024 {
00025   return this->act_;
00026 }

size_t ACE_WIN32_Asynch_Result::bytes_transferred void    const [virtual]
 

Number of bytes transferred by the operation.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 17 of file WIN32_Asynch_IO.cpp.

References bytes_transferred_.

Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::bytes_transferred, ACE_WIN32_Asynch_Read_Dgram_Result::bytes_transferred, ACE_WIN32_Asynch_Transmit_File_Result::bytes_transferred, ACE_WIN32_Asynch_Connect_Result::bytes_transferred, ACE_WIN32_Asynch_Accept_Result::bytes_transferred, ACE_WIN32_Asynch_Write_File_Result::bytes_transferred, ACE_WIN32_Asynch_Read_File_Result::bytes_transferred, ACE_WIN32_Asynch_Write_Stream_Result::bytes_transferred, ACE_WIN32_Asynch_Read_Stream_Result::bytes_transferred, ACE_WIN32_Asynch_Timer::complete, and ACE_WIN32_Proactor::post_completion.

00018 {
00019   return this->bytes_transferred_;
00020 }

const void * ACE_WIN32_Asynch_Result::completion_key void    const [virtual]
 

This returns the ACT associated with the handle when it was registered with the I/O completion port. This ACT is not the same as the ACT associated with the asynchronous operation.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 35 of file WIN32_Asynch_IO.cpp.

References completion_key_.

Referenced by ACE_WIN32_Asynch_Timer::complete, ACE_WIN32_Asynch_Write_Dgram_Result::completion_key, ACE_WIN32_Asynch_Read_Dgram_Result::completion_key, ACE_WIN32_Asynch_Transmit_File_Result::completion_key, ACE_WIN32_Asynch_Connect_Result::completion_key, ACE_WIN32_Asynch_Accept_Result::completion_key, ACE_WIN32_Asynch_Write_File_Result::completion_key, ACE_WIN32_Asynch_Read_File_Result::completion_key, ACE_WIN32_Asynch_Write_Stream_Result::completion_key, ACE_WIN32_Asynch_Read_Stream_Result::completion_key, and ACE_WIN32_Proactor::post_completion.

00036 {
00037   return this->completion_key_;
00038 }

u_long ACE_WIN32_Asynch_Result::error void    const [virtual]
 

Error value if the operation fail.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 41 of file WIN32_Asynch_IO.cpp.

References error_.

Referenced by ACE_WIN32_Asynch_Timer::complete, ACE_WIN32_Asynch_Write_Dgram_Result::error, ACE_WIN32_Asynch_Read_Dgram_Result::error, ACE_WIN32_Asynch_Transmit_File_Result::error, ACE_WIN32_Asynch_Connect_Result::error, ACE_WIN32_Asynch_Accept_Result::error, ACE_WIN32_Asynch_Write_File_Result::error, ACE_WIN32_Asynch_Read_File_Result::error, ACE_WIN32_Asynch_Write_Stream_Result::error, ACE_WIN32_Asynch_Read_Stream_Result::error, and ACE_WIN32_Proactor::handle_events.

00042 {
00043   return this->error_;
00044 }

ACE_HANDLE ACE_WIN32_Asynch_Result::event void    const [virtual]
 

Event associated with the OVERLAPPED structure.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 47 of file WIN32_Asynch_IO.cpp.

Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::event, ACE_WIN32_Asynch_Read_Dgram_Result::event, ACE_WIN32_Asynch_Transmit_File_Result::event, ACE_WIN32_Asynch_Connect_Result::event, ACE_WIN32_Asynch_Accept_Result::event, ACE_WIN32_Asynch_Write_File_Result::event, ACE_WIN32_Asynch_Read_File_Result::event, ACE_WIN32_Asynch_Write_Stream_Result::event, and ACE_WIN32_Asynch_Read_Stream_Result::event.

00048 {
00049   return this->hEvent;
00050 }

u_long ACE_WIN32_Asynch_Result::offset void    const [virtual]
 

This really make sense only when doing file I/O.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 53 of file WIN32_Asynch_IO.cpp.

Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::offset, ACE_WIN32_Asynch_Read_Dgram_Result::offset, ACE_WIN32_Asynch_Transmit_File_Result::offset, ACE_WIN32_Asynch_Connect_Result::offset, ACE_WIN32_Asynch_Accept_Result::offset, ACE_WIN32_Asynch_Write_File_Result::offset, ACE_WIN32_Asynch_Read_File_Result::offset, ACE_WIN32_Asynch_Write_Stream_Result::offset, and ACE_WIN32_Asynch_Read_Stream_Result::offset.

00054 {
00055   return this->Offset;
00056 }

u_long ACE_WIN32_Asynch_Result::offset_high void    const [virtual]
 

Offset_high associated with the OVERLAPPED structure.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 59 of file WIN32_Asynch_IO.cpp.

Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::offset_high, ACE_WIN32_Asynch_Read_Dgram_Result::offset_high, ACE_WIN32_Asynch_Transmit_File_Result::offset_high, ACE_WIN32_Asynch_Connect_Result::offset_high, ACE_WIN32_Asynch_Accept_Result::offset_high, ACE_WIN32_Asynch_Write_File_Result::offset_high, ACE_WIN32_Asynch_Read_File_Result::offset_high, ACE_WIN32_Asynch_Write_Stream_Result::offset_high, and ACE_WIN32_Asynch_Read_Stream_Result::offset_high.

00060 {
00061   return this->OffsetHigh;
00062 }

int ACE_WIN32_Asynch_Result::post_completion ACE_Proactor_Impl   proactor [virtual]
 

Post <this> to the Proactor's completion port.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 77 of file WIN32_Asynch_IO.cpp.

References ACE_ERROR_RETURN, ACE_LIB_TEXT, LM_ERROR, and ACE_WIN32_Proactor::post_completion.

Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::post_completion, ACE_WIN32_Asynch_Read_Dgram_Result::post_completion, ACE_WIN32_Asynch_Transmit_File_Result::post_completion, ACE_WIN32_Asynch_Connect_Result::post_completion, ACE_WIN32_Asynch_Accept_Result::post_completion, ACE_WIN32_Asynch_Write_File_Result::post_completion, ACE_WIN32_Asynch_Read_File_Result::post_completion, ACE_WIN32_Asynch_Write_Stream_Result::post_completion, ACE_WIN32_Asynch_Read_Stream_Result::post_completion, and ACE_WIN32_Proactor::post_wakeup_completions.

00078 {
00079   // Get to the platform specific implementation.
00080   ACE_WIN32_Proactor *win32_proactor = ACE_dynamic_cast (ACE_WIN32_Proactor *,
00081                                                          proactor);
00082 
00083   if (win32_proactor == 0)
00084     ACE_ERROR_RETURN ((LM_ERROR,
00085                        ACE_LIB_TEXT ("Dynamic cast to WIN32 Proactor failed\n")),
00086                       -1);
00087 
00088   // Post myself.
00089   return win32_proactor->post_completion (this);
00090 }

int ACE_WIN32_Asynch_Result::priority void    const [virtual]
 

The priority of the asynchronous operation. Currently, this is not supported on Win32.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 65 of file WIN32_Asynch_IO.cpp.

Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::priority, ACE_WIN32_Asynch_Read_Dgram_Result::priority, ACE_WIN32_Asynch_Transmit_File_Result::priority, ACE_WIN32_Asynch_Connect_Result::priority, ACE_WIN32_Asynch_Accept_Result::priority, ACE_WIN32_Asynch_Write_File_Result::priority, ACE_WIN32_Asynch_Read_File_Result::priority, ACE_WIN32_Asynch_Write_Stream_Result::priority, and ACE_WIN32_Asynch_Read_Stream_Result::priority.

00066 {
00067   ACE_NOTSUP_RETURN (0);
00068 }

void ACE_WIN32_Asynch_Result::set_bytes_transferred size_t    nbytes
 

Simulate value to use in the post_completion ().

Definition at line 93 of file WIN32_Asynch_IO.cpp.

References bytes_transferred_.

Referenced by ACE_WIN32_Asynch_Connect::cancel_uncompleted, ACE_WIN32_Asynch_Connect::connect_i, ACE_WIN32_Asynch_Connect::handle_close, and ACE_WIN32_Asynch_Connect::handle_output.

00094 {
00095   this->bytes_transferred_ = nbytes;
00096 }

void ACE_WIN32_Asynch_Result::set_error u_long    errcode
 

Simulate error value to use in the post_completion ().

Definition at line 99 of file WIN32_Asynch_IO.cpp.

References error_.

Referenced by ACE_WIN32_Asynch_Connect::cancel_uncompleted, ACE_WIN32_Asynch_Connect::connect, ACE_WIN32_Asynch_Connect::connect_i, ACE_WIN32_Asynch_Connect::handle_close, ACE_WIN32_Asynch_Connect::handle_output, ACE_WIN32_Asynch_Read_File::readv, ACE_WIN32_Asynch_Read_Stream::readv, ACE_WIN32_Asynch_Read_Stream::shared_read, ACE_WIN32_Asynch_Write_Stream::shared_write, and ACE_WIN32_Asynch_Write_File::writev.

00100 {
00101   this->error_ = errcode;
00102 }

int ACE_WIN32_Asynch_Result::signal_number void    const [virtual]
 

Returns 0.

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 71 of file WIN32_Asynch_IO.cpp.

Referenced by ACE_WIN32_Asynch_Result, ACE_WIN32_Asynch_Write_Dgram_Result::signal_number, ACE_WIN32_Asynch_Read_Dgram_Result::signal_number, ACE_WIN32_Asynch_Transmit_File_Result::signal_number, ACE_WIN32_Asynch_Connect_Result::signal_number, ACE_WIN32_Asynch_Accept_Result::signal_number, ACE_WIN32_Asynch_Write_File_Result::signal_number, ACE_WIN32_Asynch_Read_File_Result::signal_number, ACE_WIN32_Asynch_Write_Stream_Result::signal_number, and ACE_WIN32_Asynch_Read_Stream_Result::signal_number.

00072 {
00073   ACE_NOTSUP_RETURN (0);
00074 }

int ACE_WIN32_Asynch_Result::success void    const [virtual]
 

Did the operation succeed?

Implements ACE_Asynch_Result_Impl.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 29 of file WIN32_Asynch_IO.cpp.

References success_.

Referenced by ACE_WIN32_Asynch_Timer::complete, ACE_WIN32_Asynch_Write_Dgram_Result::success, ACE_WIN32_Asynch_Read_Dgram_Result::success, ACE_WIN32_Asynch_Transmit_File_Result::success, ACE_WIN32_Asynch_Connect_Result::success, ACE_WIN32_Asynch_Accept_Result::success, ACE_WIN32_Asynch_Write_File_Result::success, ACE_WIN32_Asynch_Read_File_Result::success, ACE_WIN32_Asynch_Write_Stream_Result::success, and ACE_WIN32_Asynch_Read_Stream_Result::success.

00030 {
00031   return this->success_;
00032 }


Friends And Related Function Documentation

friend class ACE_WIN32_Asynch_Accept [friend]
 

Factory class has special permissions.

Reimplemented in ACE_WIN32_Asynch_Accept_Result.

Definition at line 64 of file WIN32_Asynch_IO.h.

friend class ACE_WIN32_Proactor [friend]
 

Proactor class has special permission.

Reimplemented in ACE_WIN32_Asynch_Read_Stream_Result.

Definition at line 67 of file WIN32_Asynch_IO.h.


Member Data Documentation

const void* ACE_WIN32_Asynch_Result::act_ [protected]
 

ACT for this operation.

Definition at line 131 of file WIN32_Asynch_IO.h.

Referenced by act.

size_t ACE_WIN32_Asynch_Result::bytes_transferred_ [protected]
 

Bytes transferred by this operation.

Definition at line 134 of file WIN32_Asynch_IO.h.

Referenced by bytes_transferred, ACE_WIN32_Asynch_Write_Dgram_Result::complete, ACE_WIN32_Asynch_Read_Dgram_Result::complete, ACE_WIN32_Asynch_Transmit_File_Result::complete, ACE_WIN32_Asynch_Connect_Result::complete, ACE_WIN32_Asynch_Accept_Result::complete, ACE_WIN32_Asynch_Write_File_Result::complete, ACE_WIN32_Asynch_Read_File_Result::complete, ACE_WIN32_Asynch_Write_Stream_Result::complete, ACE_WIN32_Asynch_Read_Stream_Result::complete, and set_bytes_transferred.

const void* ACE_WIN32_Asynch_Result::completion_key_ [protected]
 

ACT associated with handle.

Definition at line 140 of file WIN32_Asynch_IO.h.

Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::complete, ACE_WIN32_Asynch_Read_Dgram_Result::complete, ACE_WIN32_Asynch_Transmit_File_Result::complete, ACE_WIN32_Asynch_Connect_Result::complete, ACE_WIN32_Asynch_Accept_Result::complete, ACE_WIN32_Asynch_Write_File_Result::complete, ACE_WIN32_Asynch_Read_File_Result::complete, ACE_WIN32_Asynch_Write_Stream_Result::complete, ACE_WIN32_Asynch_Read_Stream_Result::complete, and completion_key.

u_long ACE_WIN32_Asynch_Result::error_ [protected]
 

Error if operation failed.

Definition at line 143 of file WIN32_Asynch_IO.h.

Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::complete, ACE_WIN32_Asynch_Read_Dgram_Result::complete, ACE_WIN32_Asynch_Transmit_File_Result::complete, ACE_WIN32_Asynch_Connect_Result::complete, ACE_WIN32_Asynch_Accept_Result::complete, ACE_WIN32_Asynch_Write_File_Result::complete, ACE_WIN32_Asynch_Read_File_Result::complete, ACE_WIN32_Asynch_Write_Stream_Result::complete, ACE_WIN32_Asynch_Read_Stream_Result::complete, error, and set_error.

ACE_Handler& ACE_WIN32_Asynch_Result::handler_ [protected]
 

Handler that will be called back.

Definition at line 128 of file WIN32_Asynch_IO.h.

Referenced by ACE_WIN32_Wakeup_Completion::complete, ACE_WIN32_Asynch_Timer::complete, ACE_WIN32_Asynch_Write_Dgram_Result::complete, ACE_WIN32_Asynch_Read_Dgram_Result::complete, ACE_WIN32_Asynch_Transmit_File_Result::complete, ACE_WIN32_Asynch_Connect_Result::complete, ACE_WIN32_Asynch_Accept_Result::complete, ACE_WIN32_Asynch_Write_File_Result::complete, ACE_WIN32_Asynch_Read_File_Result::complete, ACE_WIN32_Asynch_Write_Stream_Result::complete, and ACE_WIN32_Asynch_Read_Stream_Result::complete.

int ACE_WIN32_Asynch_Result::success_ [protected]
 

Success indicator.

Definition at line 137 of file WIN32_Asynch_IO.h.

Referenced by ACE_WIN32_Asynch_Write_Dgram_Result::complete, ACE_WIN32_Asynch_Read_Dgram_Result::complete, ACE_WIN32_Asynch_Transmit_File_Result::complete, ACE_WIN32_Asynch_Connect_Result::complete, ACE_WIN32_Asynch_Accept_Result::complete, ACE_WIN32_Asynch_Write_File_Result::complete, ACE_WIN32_Asynch_Read_File_Result::complete, ACE_WIN32_Asynch_Write_Stream_Result::complete, ACE_WIN32_Asynch_Read_Stream_Result::complete, and success.


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