POA_Current_Impl.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: POA_Current_Impl.inl 73581 2006-07-17 14:42:07Z elliott_c $
00004 
00005 #include "tao/SystemException.h"
00006 
00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 namespace TAO
00010 {
00011   namespace Portable_Server
00012   {
00013     ACE_INLINE void
00014     POA_Current_Impl::poa (::TAO_Root_POA *p)
00015     {
00016       this->poa_ = p;
00017     }
00018 
00019     ACE_INLINE ::TAO_Root_POA *
00020     POA_Current_Impl::poa (void) const
00021     {
00022       return this->poa_;
00023     }
00024 
00025     ACE_INLINE void
00026     POA_Current_Impl::object_id (const PortableServer::ObjectId &id)
00027     {
00028       if (this->object_id_.release () ||
00029           this->object_id_.get_buffer() == this->object_id_buf_)
00030         {
00031           // Resize the current object_id_.  If it is less than the
00032           // length of the current buffer, no allocation will take place.
00033           size_t id_size = id.length ();
00034           this->object_id_.length (id_size);
00035 
00036           // Get the buffer and copy the new object id in it's place.
00037           ACE_OS::memcpy (this->object_id_.get_buffer (),
00038                           id.get_buffer (), id_size);
00039         }
00040       else
00041         {
00042           this->object_id_ = id;
00043         }
00044     }
00045 
00046     ACE_INLINE const PortableServer::ObjectId &
00047     POA_Current_Impl::object_id (void) const
00048     {
00049       return this->object_id_;
00050     }
00051 
00052     ACE_INLINE void
00053     POA_Current_Impl::replace_object_id (
00054       const PortableServer::ObjectId &system_id)
00055     {
00056       // This has the effect of replacing the underlying buffer
00057       // with that of another object id without copying.
00058       object_id_.replace (system_id.maximum (),
00059                           system_id.length (),
00060                           const_cast <CORBA::Octet *> (system_id.get_buffer ()),
00061                           0);
00062     }
00063 
00064     ACE_INLINE void
00065     POA_Current_Impl::object_key (const TAO::ObjectKey &key)
00066     {
00067       this->object_key_ = &key;
00068     }
00069 
00070     ACE_INLINE const TAO::ObjectKey &
00071     POA_Current_Impl::object_key (void) const
00072     {
00073       return *this->object_key_;
00074     }
00075 
00076     ACE_INLINE void
00077     POA_Current_Impl::servant (PortableServer::Servant servant)
00078     {
00079       this->servant_ = servant;
00080     }
00081 
00082     ACE_INLINE PortableServer::Servant
00083     POA_Current_Impl::servant (void) const
00084     {
00085       return this->servant_;
00086     }
00087 
00088     ACE_INLINE void
00089     POA_Current_Impl::priority (CORBA::Short priority)
00090     {
00091       this->priority_ = priority;
00092     }
00093 
00094     ACE_INLINE CORBA::Short
00095     POA_Current_Impl::priority (void) const
00096     {
00097       return this->priority_;
00098     }
00099 
00100   }
00101 }
00102 
00103 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7