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

ACE_Svc_Tuple Class Template Reference

Holds the ACE_Svc_Handler and its argument and <ACE_Timer_Handle> until an asynchronous connection completes. More...

#include <Connector.h>

Collaboration diagram for ACE_Svc_Tuple:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Svc_Tuple (SVC_HANDLER *, ACE_HANDLE, const void *=0, long timer_id=-1)
SVC_HANDLER * svc_handler (void)
 Get SVC_HANDLER. More...

ACE_HANDLE handle (void)
 Get handle. More...

void handle (ACE_HANDLE)
 Set handle. More...

const void * arg (void)
 Get argument. More...

void arg (const void *)
 Set argument. More...

long cancellation_id (void)
 Get cancellation id. More...

void cancellation_id (long timer_id)
 Set cancellation id. More...

long incr_refcount (void)
 Increment and decrement refcount within the context of the lock on the ACE_Connector. More...

long decr_refcount (void)
void dump (void) const
 Dump the state of an object. More...


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...


Protected Methods

 ~ACE_Svc_Tuple (void)
 Prevent direct deletion. More...


Private Attributes

SVC_HANDLER * svc_handler_
 Associated SVC_HANDLER. More...

ACE_HANDLE handle_
 IPC <HANDLE> that we are trying to connect. More...

const void * arg_
 Associated argument. More...

long cancellation_id_
 Associated cancellation id. More...

long refcount_
 Reference count manipulated within the context of the connector lock. TODO: Things will change after 5.3 goes out of the way. More...


Detailed Description

template<class SVC_HANDLER>
class ACE_Svc_Tuple< SVC_HANDLER >

Holds the ACE_Svc_Handler and its argument and <ACE_Timer_Handle> until an asynchronous connection completes.

This is a no-brainer...

Definition at line 38 of file Connector.h.


Constructor & Destructor Documentation

template<class SVC_HANDLER>
ACE_Svc_Tuple< SVC_HANDLER >::ACE_Svc_Tuple SVC_HANDLER *   ,
ACE_HANDLE   ,
const void *    = 0,
long    timer_id = -1
 

Definition at line 151 of file Connector.cpp.

References ACE_TRACE.

00156   : svc_handler_ (sh),
00157     handle_ (handle),
00158     arg_ (arg),
00159     cancellation_id_ (id),
00160     refcount_ (1)
00161 {
00162   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::ACE_Svc_Tuple");
00163 }

template<class SVC_HANDLER>
ACE_Svc_Tuple< SVC_HANDLER >::~ACE_Svc_Tuple void    [protected]
 

Prevent direct deletion.

Definition at line 166 of file Connector.cpp.

00167 {
00168 }


Member Function Documentation

template<class SVC_HANDLER>
void ACE_Svc_Tuple< SVC_HANDLER >::arg const void *   
 

Set argument.

Definition at line 185 of file Connector.cpp.

References ACE_TRACE, and arg_.

00186 {
00187   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::arg");
00188   this->arg_ = v;
00189 }

template<class SVC_HANDLER>
const void * ACE_Svc_Tuple< SVC_HANDLER >::arg void   
 

Get argument.

Definition at line 178 of file Connector.cpp.

References ACE_TRACE, and arg_.

Referenced by ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::handle_timeout.

00179 {
00180   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::arg");
00181   return this->arg_;
00182 }

template<class SVC_HANDLER>
void ACE_Svc_Tuple< SVC_HANDLER >::cancellation_id long    timer_id
 

Set cancellation id.

Definition at line 213 of file Connector.cpp.

References ACE_TRACE, and cancellation_id_.

00214 {
00215   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::cancellation_id");
00216   this->cancellation_id_ = id;
00217 }

template<class SVC_HANDLER>
long ACE_Svc_Tuple< SVC_HANDLER >::cancellation_id void   
 

Get cancellation id.

Definition at line 206 of file Connector.cpp.

References ACE_TRACE, and cancellation_id_.

Referenced by ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::create_AST.

00207 {
00208   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::cancellation_id");
00209   return this->cancellation_id_;
00210 }

template<class SVC_HANDLER>
long ACE_Svc_Tuple< SVC_HANDLER >::decr_refcount void   
 

Definition at line 227 of file Connector.cpp.

References ACE_ASSERT, ACE_TRACE, and refcount_.

Referenced by ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::create_AST.

00228 {
00229   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::decr_refcount");
00230   if (--this->refcount_ > 0)
00231     return this->refcount_;
00232 
00233   ACE_ASSERT (this->refcount_ == 0);
00234 
00235   delete this;
00236 
00237   return 0;
00238 }

template<class SVC_HANDLER>
void ACE_Svc_Tuple< SVC_HANDLER >::dump void    const
 

Dump the state of an object.

Definition at line 241 of file Connector.cpp.

References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, and LM_DEBUG.

00242 {
00243   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::dump");
00244 
00245   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00246   ACE_DEBUG ((LM_DEBUG,  ACE_LIB_TEXT ("svc_handler_ = %x"), this->svc_handler_));
00247   ACE_DEBUG ((LM_DEBUG,  ACE_LIB_TEXT ("\narg_ = %x"), this->arg_));
00248   ACE_DEBUG ((LM_DEBUG,  ACE_LIB_TEXT ("\ncancellation_id_ = %d"), this->cancellation_id_));
00249   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00250 }

template<class SVC_HANDLER>
void ACE_Svc_Tuple< SVC_HANDLER >::handle ACE_HANDLE   
 

Set handle.

Definition at line 199 of file Connector.cpp.

References ACE_TRACE, and handle_.

00200 {
00201   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::handle");
00202   this->handle_ = h;
00203 }

template<class SVC_HANDLER>
ACE_HANDLE ACE_Svc_Tuple< SVC_HANDLER >::handle void   
 

Get handle.

Definition at line 192 of file Connector.cpp.

References ACE_TRACE, and handle_.

00193 {
00194   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::handle");
00195   return this->handle_;
00196 }

template<class SVC_HANDLER>
long ACE_Svc_Tuple< SVC_HANDLER >::incr_refcount void   
 

Increment and decrement refcount within the context of the lock on the ACE_Connector.

Definition at line 220 of file Connector.cpp.

References ACE_TRACE, and refcount_.

Referenced by ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::create_AST.

00221 {
00222   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::incr_refcount");
00223   return ++this->refcount_;
00224 }

template<class SVC_HANDLER>
SVC_HANDLER * ACE_Svc_Tuple< SVC_HANDLER >::svc_handler void   
 

Get SVC_HANDLER.

Definition at line 171 of file Connector.cpp.

References ACE_TRACE, and svc_handler_.

Referenced by ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::handle_close, ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::handle_input, ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::handle_output, and ACE_Connector< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >::handle_timeout.

00172 {
00173   ACE_TRACE ("ACE_Svc_Tuple<SVC_HANDLER>::svc_handler");
00174   return this->svc_handler_;
00175 }


Member Data Documentation

template<class SVC_HANDLER>
ACE_Svc_Tuple::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Definition at line 82 of file Connector.h.

template<class SVC_HANDLER>
const void* ACE_Svc_Tuple::arg_ [private]
 

Associated argument.

Definition at line 96 of file Connector.h.

Referenced by arg.

template<class SVC_HANDLER>
long ACE_Svc_Tuple::cancellation_id_ [private]
 

Associated cancellation id.

Definition at line 99 of file Connector.h.

Referenced by cancellation_id.

template<class SVC_HANDLER>
ACE_HANDLE ACE_Svc_Tuple::handle_ [private]
 

IPC <HANDLE> that we are trying to connect.

Definition at line 93 of file Connector.h.

Referenced by handle.

template<class SVC_HANDLER>
long ACE_Svc_Tuple::refcount_ [private]
 

Reference count manipulated within the context of the connector lock. TODO: Things will change after 5.3 goes out of the way.

@

Definition at line 104 of file Connector.h.

Referenced by decr_refcount, and incr_refcount.

template<class SVC_HANDLER>
SVC_HANDLER* ACE_Svc_Tuple::svc_handler_ [private]
 

Associated SVC_HANDLER.

Definition at line 90 of file Connector.h.

Referenced by svc_handler.


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