Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PI / RequestInterceptor_Adapter_Impl.cpp
blobb9c074cd79ef796b07243d62a06101ec049bdbb9
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file RequestInterceptor_Adapter_Impl.cpp
7 * This file an adapter class to simplify the support of
8 * interceptors.
9 */
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 ()
27 void
28 TAO_RequestInterceptor_Adapter_Impl::popTSC (
29 TAO_ORB_Core *orb_core)
31 // Retrieve the thread scope current (no TSS access incurred yet).
32 TAO::PICurrent
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 ();
44 void
45 TAO_RequestInterceptor_Adapter_Impl::pushTSC (
46 TAO_ORB_Core *orb_core)
48 // Retrieve the thread scope current (no TSS access incurred yet).
49 TAO::PICurrent
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 */