00001 // -*- C++ -*- 00002 // 00003 // $Id: PICurrent_Impl.inl 85371 2009-05-18 13:39:38Z sma $ 00004 00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 ACE_INLINE 00008 TAO::PICurrent_Impl::PICurrent_Impl ( 00009 TAO_ORB_Core *orb_core, 00010 size_t tss_slot, 00011 PICurrent_Impl *pop) 00012 : orb_core_ (orb_core), 00013 tss_slot_ (tss_slot), 00014 pop_ (pop), 00015 push_ (0), 00016 slot_table_ (), 00017 lazy_copy_ (0), 00018 impending_change_callback_ (0) 00019 { 00020 } 00021 00022 ACE_INLINE void 00023 TAO::PICurrent_Impl::convert_from_lazy_to_real_copy () 00024 { 00025 // Make sure we take a physical copy of the existing logical 00026 // copy of the table before it disappears/changes. 00027 if (0 != this->lazy_copy_) 00028 { 00029 this->slot_table_ = this->lazy_copy_->current_slot_table (); 00030 00031 // Must tell the old copied PICurrent_Impl that we no 00032 // longer want to be told when/if it is going to be 00033 // changed or destroyed. 00034 this->lazy_copy_->set_callback_for_impending_change (0); 00035 this->lazy_copy_ = 0; 00036 } 00037 } 00038 00039 ACE_INLINE void 00040 TAO::PICurrent_Impl::set_callback_for_impending_change (TAO::PICurrent_Impl *p) 00041 { 00042 this->impending_change_callback_ = (this == p) ? 0 : p; 00043 } 00044 00045 ACE_INLINE TAO::PICurrent_Impl::Table & 00046 TAO::PICurrent_Impl::current_slot_table () 00047 { 00048 return (0 == this->lazy_copy_) ? 00049 this->slot_table_ : 00050 this->lazy_copy_->current_slot_table (); 00051 } 00052 00053 TAO_END_VERSIONED_NAMESPACE_DECL