ORB_Table.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: ORB_Table.inl 80823 2008-03-04 10:11:35Z johnnyw $
00004 
00005 #include "tao/ORB_Core.h"
00006 
00007 #include <algorithm>
00008 
00009 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00010 
00011 ACE_INLINE ::TAO_ORB_Core *
00012 TAO::ORB_Table::first_orb (void)
00013 {
00014   return this->first_orb_;
00015 }
00016 
00017 ACE_INLINE TAO::ORB_Table::iterator
00018 TAO::ORB_Table::begin (void)
00019 {
00020   return this->table_.begin ();
00021 }
00022 
00023 ACE_INLINE TAO::ORB_Table::iterator
00024 TAO::ORB_Table::end (void)
00025 {
00026   return this->table_.end ();
00027 }
00028 
00029 /// Accessor to the underlying table_
00030 ACE_INLINE TAO::ORB_Table::Table *
00031 TAO::ORB_Table::table (void)
00032 {
00033   return &this->table_;
00034 }
00035 
00036 ACE_INLINE TAO_SYNCH_MUTEX &
00037 TAO::ORB_Table::lock (void)
00038 {
00039   return this->lock_;
00040 }
00041 
00042 // ****************************************************************
00043 
00044 ACE_INLINE
00045 TAO::ORB_Core_Ref_Counter::ORB_Core_Ref_Counter (void)
00046   : core_ (0)
00047 {
00048 }
00049 
00050 ACE_INLINE
00051 TAO::ORB_Core_Ref_Counter::ORB_Core_Ref_Counter (::TAO_ORB_Core * core)
00052   : core_ (core)
00053 {
00054 //   ACE_ASSERT (core != 0);
00055 
00056   // Note that the TAO_ORB_Core pointer should always be valid in this
00057   // constructor.
00058 
00059   // Claim ownership.
00060   (void) this->core_->_incr_refcnt ();
00061 }
00062 
00063 ACE_INLINE
00064 TAO::ORB_Core_Ref_Counter::~ORB_Core_Ref_Counter (void)
00065 {
00066   if (this->core_)
00067     (void) this->core_->_decr_refcnt (); // Should never throw.
00068 }
00069 
00070 ACE_INLINE
00071 TAO::ORB_Core_Ref_Counter::ORB_Core_Ref_Counter (
00072   TAO::ORB_Core_Ref_Counter const & rhs)
00073   : core_ (rhs.core_)
00074 {
00075   // Claim ownership.
00076   if (this->core_)
00077     (void) this->core_->_incr_refcnt ();
00078 }
00079 
00080 ACE_INLINE void
00081 TAO::ORB_Core_Ref_Counter::operator= (TAO::ORB_Core_Ref_Counter const & rhs)
00082 {
00083   // Strongly exception safe.  May not be strictly necessary, but
00084   // let's do things the right way, regardless.
00085   TAO::ORB_Core_Ref_Counter tmp (rhs);
00086   std::swap (this->core_, tmp.core_);
00087 }
00088 
00089 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7