3 //=============================================================================
5 * @file RequestInterceptor_Adapter_Impl.cpp
7 * This file an adapter class to simplify the support of
10 //=============================================================================
12 #include "tao/PI/RequestInterceptor_Adapter_Impl.h"
14 #if TAO_HAS_INTERCEPTORS == 1
16 #include "tao/ORB_Core.h"
17 #include "tao/PI/RequestInterceptor_Adapter_Impl.h"
18 #include "tao/PI/PICurrent.h"
19 #include "tao/PI/PICurrent_Impl.h"
21 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
23 TAO_RequestInterceptor_Adapter_Impl::~TAO_RequestInterceptor_Adapter_Impl ()
28 TAO_RequestInterceptor_Adapter_Impl::popTSC (
29 TAO_ORB_Core
*orb_core
)
31 // Retrieve the thread scope current (no TSS access incurred yet).
33 *pi_current
= dynamic_cast <TAO::PICurrent
*> (
34 orb_core
->pi_current ());
36 // If the slot count is zero, there is nothing to copy. Prevent any
37 // copying (and hence TSS accesses) from occurring.
38 if (pi_current
&& pi_current
->slot_count ())
40 pi_current
->tsc ()->pop ();
45 TAO_RequestInterceptor_Adapter_Impl::pushTSC (
46 TAO_ORB_Core
*orb_core
)
48 // Retrieve the thread scope current (no TSS access incurred yet).
50 *pi_current
= dynamic_cast <TAO::PICurrent
*> (
51 orb_core
->pi_current ());
53 // If the slot count is zero, there is nothing to copy. Prevent any
54 // copying (and hence TSS accesses) from occurring.
55 if (pi_current
&& pi_current
->slot_count ())
57 pi_current
->tsc ()->push ();
61 TAO_END_VERSIONED_NAMESPACE_DECL
63 #endif /* TAO_HAS_INTERCEPTORS == 1 */