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

ACE_Asynch_Result Class Reference

An interface base class which allows users access to common information related to an asynchronous operation. More...

#include <Asynch_IO.h>

Inheritance diagram for ACE_Asynch_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_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 fails. More...

ACE_HANDLE event (void) const
u_long offset (void) const
u_long offset_high (void) const
int priority (void) const
int signal_number (void) const
virtual ~ACE_Asynch_Result (void)
 Destructor. More...


Protected Methods

 ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation)
 Constructor. This implementation will not be deleted. The implementation will be deleted by the Proactor. More...

ACE_Asynch_Result_Implimplementation (void) const
 Get the implementation class. More...


Protected Attributes

ACE_Asynch_Result_Implimplementation_
 Implementation class. More...


Detailed Description

An interface base class which allows users access to common information related to an asynchronous operation.

An interface 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 63 of file Asynch_IO.h.


Constructor & Destructor Documentation

ACE_Asynch_Result::~ACE_Asynch_Result void    [virtual]
 

Destructor.

Definition at line 81 of file Asynch_IO.cpp.

00082 {
00083   // Proactor deletes the implementation when the <complete> finishes.  
00084 }

ACE_Asynch_Result::ACE_Asynch_Result ACE_Asynch_Result_Impl   implementation [protected]
 

Constructor. This implementation will not be deleted. The implementation will be deleted by the Proactor.

Definition at line 76 of file Asynch_IO.cpp.

00077   : implementation_ (implementation)
00078 {
00079 }


Member Function Documentation

const void * ACE_Asynch_Result::act void    const
 

ACT associated with the operation.

Definition at line 23 of file Asynch_IO.cpp.

References ACE_Asynch_Result_Impl::act, and implementation.

Referenced by ACE_Asynch_Acceptor::handle_accept, ACE_Asynch_Connector::handle_connect, and ACE_POSIX_Asynch_Transmit_Handler::handle_write_stream.

00024 {
00025   return this->implementation ()->act ();
00026 }

size_t ACE_Asynch_Result::bytes_transferred void    const
 

Number of bytes transferred by the operation.

Definition at line 17 of file Asynch_IO.cpp.

References ACE_Asynch_Result_Impl::bytes_transferred, and implementation.

Referenced by ACE_POSIX_Asynch_Transmit_Handler::handle_read_file, and ACE_POSIX_Asynch_Transmit_Handler::handle_write_stream.

00018 {
00019   return this->implementation ()->bytes_transferred ();
00020 }

const void * ACE_Asynch_Result::completion_key void    const
 

This is the ACT associated with the handle on which the Asynch_Operation takes place.

On WIN32, this returns the ACT associated with the handle when it was registered with the I/O completion port.

@ This is not implemented for POSIX4 platforms. Returns 0.

Definition at line 35 of file Asynch_IO.cpp.

References ACE_Asynch_Result_Impl::completion_key, and implementation.

00036 {
00037   return this->implementation ()->completion_key ();
00038 }

u_long ACE_Asynch_Result::error void    const
 

Error value if the operation fails.

Definition at line 41 of file Asynch_IO.cpp.

References ACE_Asynch_Result_Impl::error, and implementation.

Referenced by ACE_Asynch_Connector::handle_connect.

00042 {
00043   return this->implementation ()->error ();
00044 }

ACE_HANDLE ACE_Asynch_Result::event void    const
 

On WIN32, this returns the event associated with the OVERLAPPED structure.

This returns ACE_INVALID_HANDLE on POSIX4-Unix platforms.

Definition at line 47 of file Asynch_IO.cpp.

References ACE_Asynch_Result_Impl::event, and implementation.

00048 {
00049   return this->implementation ()->event ();
00050 }

ACE_Asynch_Result_Impl * ACE_Asynch_Result::implementation void    const [protected]
 

Get the implementation class.

Reimplemented in ACE_Asynch_Read_Stream::Result.

Definition at line 87 of file Asynch_IO.cpp.

References implementation_.

Referenced by act, bytes_transferred, completion_key, error, event, offset, offset_high, priority, signal_number, and success.

00088 {
00089   return this->implementation_;
00090 }

u_long ACE_Asynch_Result::offset void    const
 

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

On WIN32, these are represented in the OVERLAPPED datastructure.

@ On POSIX4-Unix, offset_high should be supported using aiocb64.

Definition at line 53 of file Asynch_IO.cpp.

References implementation, and ACE_Asynch_Result_Impl::offset.

00054 {
00055   return this->implementation ()->offset ();
00056 }

u_long ACE_Asynch_Result::offset_high void    const
 

Definition at line 59 of file Asynch_IO.cpp.

References implementation, and ACE_Asynch_Result_Impl::offset_high.

00060 {
00061   return this->implementation ()->offset_high ();
00062 }

int ACE_Asynch_Result::priority void    const
 

Priority of the operation.

On POSIX4-Unix, this is supported. Priority works like <nice> in Unix. Negative values are not allowed. 0 means priority of the operation same as the process priority. 1 means priority of the operation is one less than process. And so forth.

On Win32, this is a no-op.

Definition at line 65 of file Asynch_IO.cpp.

References implementation, and ACE_Asynch_Result_Impl::priority.

00066 {
00067   return this->implementation ()->priority ();
00068 }

int ACE_Asynch_Result::signal_number void    const
 

POSIX4 real-time signal number to be used for the operation. <signal_number> ranges from ACE_SIGRTMIN to ACE_SIGRTMAX. By default, ACE_SIGRTMIN is used to issue <aio_> calls. This is a no-op on non-POSIX4 systems and returns 0.

Definition at line 71 of file Asynch_IO.cpp.

References implementation, and ACE_Asynch_Result_Impl::signal_number.

00072 {
00073   return this->implementation ()->signal_number ();
00074 }

int ACE_Asynch_Result::success void    const
 

Did the operation succeed?

Definition at line 29 of file Asynch_IO.cpp.

References implementation, and ACE_Asynch_Result_Impl::success.

Referenced by ACE_Asynch_Acceptor::handle_accept, ACE_Asynch_Connector::handle_connect, ACE_POSIX_Asynch_Transmit_Handler::handle_read_file, and ACE_POSIX_Asynch_Transmit_Handler::handle_write_stream.

00030 {
00031   return this->implementation ()->success ();
00032 }


Member Data Documentation

ACE_Asynch_Result_Impl* ACE_Asynch_Result::implementation_ [protected]
 

Implementation class.

Reimplemented in ACE_Asynch_Read_Stream::Result.

Definition at line 142 of file Asynch_IO.h.

Referenced by implementation.


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