TAO 3.1.4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TAO::Transport_Selection_Guard Class Reference

Used by the Transport Current feature to keep track of which Transport is currently active. More...

#include <Transport_Selection_Guard.h>

Collaboration diagram for TAO::Transport_Selection_Guard:
Collaboration graph
[legend]

Public Member Functions

 Transport_Selection_Guard (TAO_Transport *t)
 Ctor.
 
 ~Transport_Selection_Guard ()
 Dtor.
 
TAO_Transportoperator-> () const
 getter
 
TAO_Transportoperator* () const
 getter
 
TAO_Transportget () const
 Getter.
 
Transport_Selection_Guardset (TAO_Transport *t)
 Setter.
 
Transport_Selection_Guardoperator= (const Transport_Selection_Guard &rhs)
 

Static Public Member Functions

static Transport_Selection_Guardcurrent (TAO_ORB_Core *core, size_t tss_slot_id)
 

Private Member Functions

 Transport_Selection_Guard (const Transport_Selection_Guard &)=delete
 

Private Attributes

TAO_Transportcurr_
 The "real" Transport, i.e. the one selected at present.
 

Friends

bool operator== (const Transport_Selection_Guard &lhs, const TAO_Transport *rhs)
 
bool operator== (const TAO_Transport *lhs, const Transport_Selection_Guard &rhs)
 
bool operator!= (const Transport_Selection_Guard &lhs, const TAO_Transport *rhs)
 
bool operator!= (const TAO_Transport *lhs, const Transport_Selection_Guard &rhs)
 
template<class U >
bool operator== (const Transport_Selection_Guard &lhs, const U *rhs)
 
template<class U >
bool operator== (const U *lhs, const Transport_Selection_Guard &rhs)
 
template<class U >
bool operator!= (const Transport_Selection_Guard &lhs, const U *rhs)
 
template<class U >
bool operator!= (const U *lhs, const Transport_Selection_Guard &rhs)
 

Detailed Description

Used by the Transport Current feature to keep track of which Transport is currently active.

Whenever a Transport is selected: during an upcall, or prior to a client invocation an instance of this class is created [on the stack, or as a member of another class] to keep track of the said Transport. The class implements the RAII idiom, which makes it possible to build a stack of these instances as the thread is doing nested upcalls or client invocations.

It utilizes TAO_TSS_Resources::tsg_ member pointer to keep track of stack-linked Transport_Selection_Guard instances.

If the Transport Current feature is disabled most methods are no-ops and add no overhead on the critical path.

See Also:

https://htmlpreview.github.io/?https://github.com/DOCGroup/ACE_TAO/blob/master/TAO/docs/transport_current/index.html

Constructor & Destructor Documentation

◆ Transport_Selection_Guard() [1/2]

TAO::Transport_Selection_Guard::Transport_Selection_Guard ( TAO_Transport * t)

Ctor.

◆ ~Transport_Selection_Guard()

TAO::Transport_Selection_Guard::~Transport_Selection_Guard ( )

Dtor.

◆ Transport_Selection_Guard() [2/2]

TAO::Transport_Selection_Guard::Transport_Selection_Guard ( const Transport_Selection_Guard & )
privatedelete

Member Function Documentation

◆ current()

Transport_Selection_Guard * TAO::Transport_Selection_Guard::current ( TAO_ORB_Core * core,
size_t tss_slot_id )
static

◆ get()

TAO_Transport * TAO::Transport_Selection_Guard::get ( ) const
inline

Getter.

◆ operator*()

TAO_Transport & TAO::Transport_Selection_Guard::operator* ( ) const
inline

getter

◆ operator->()

TAO_Transport * TAO::Transport_Selection_Guard::operator-> ( ) const
inline

getter

◆ operator=()

Transport_Selection_Guard & TAO::Transport_Selection_Guard::operator= ( const Transport_Selection_Guard & rhs)
inline

◆ set()

Transport_Selection_Guard & TAO::Transport_Selection_Guard::set ( TAO_Transport * t)
inline

Setter.

Friends And Related Symbol Documentation

◆ operator!= [1/4]

bool operator!= ( const TAO_Transport * lhs,
const Transport_Selection_Guard & rhs )
friend

◆ operator!= [2/4]

bool operator!= ( const Transport_Selection_Guard & lhs,
const TAO_Transport * rhs )
friend

◆ operator!= [3/4]

template<class U >
bool operator!= ( const Transport_Selection_Guard & lhs,
const U * rhs )
friend

◆ operator!= [4/4]

template<class U >
bool operator!= ( const U * lhs,
const Transport_Selection_Guard & rhs )
friend

◆ operator== [1/4]

bool operator== ( const TAO_Transport * lhs,
const Transport_Selection_Guard & rhs )
friend

◆ operator== [2/4]

bool operator== ( const Transport_Selection_Guard & lhs,
const TAO_Transport * rhs )
friend

◆ operator== [3/4]

template<class U >
bool operator== ( const Transport_Selection_Guard & lhs,
const U * rhs )
friend

◆ operator== [4/4]

template<class U >
bool operator== ( const U * lhs,
const Transport_Selection_Guard & rhs )
friend

Member Data Documentation

◆ curr_

TAO_Transport* TAO::Transport_Selection_Guard::curr_
private

The "real" Transport, i.e. the one selected at present.


The documentation for this class was generated from the following files: