2 #include "tao/SystemException.h"
4 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
8 namespace Portable_Server
11 POA_Current_Impl::poa (::TAO_Root_POA *p)
16 ACE_INLINE ::TAO_Root_POA *
17 POA_Current_Impl::poa () const
23 POA_Current_Impl::object_id (const PortableServer::ObjectId &id)
25 if (this->object_id_.release () ||
26 this->object_id_.get_buffer() == this->object_id_buf_)
28 // Resize the current object_id_. If it is less than the
29 // length of the current buffer, no allocation will take place.
30 CORBA::ULong id_size = id.length ();
31 this->object_id_.length (id_size);
33 // Get the buffer and copy the new object id in it's place.
34 ACE_OS::memcpy (this->object_id_.get_buffer (),
35 id.get_buffer (), id_size);
39 this->object_id_ = id;
43 ACE_INLINE const PortableServer::ObjectId &
44 POA_Current_Impl::object_id () const
46 return this->object_id_;
50 POA_Current_Impl::replace_object_id (
51 const PortableServer::ObjectId &system_id)
53 // This has the effect of replacing the underlying buffer
54 // with that of another object id without copying.
55 object_id_.replace (system_id.maximum (),
57 const_cast <CORBA::Octet *> (system_id.get_buffer ()),
62 POA_Current_Impl::object_key (const TAO::ObjectKey &key)
64 this->object_key_ = &key;
67 ACE_INLINE const TAO::ObjectKey &
68 POA_Current_Impl::object_key () const
70 return *this->object_key_;
74 POA_Current_Impl::servant (PortableServer::Servant servant)
76 this->servant_ = servant;
79 ACE_INLINE PortableServer::Servant
80 POA_Current_Impl::servant () const
82 return this->servant_;
86 POA_Current_Impl::priority (CORBA::Short priority)
88 this->priority_ = priority;
91 ACE_INLINE CORBA::Short
92 POA_Current_Impl::priority () const
94 return this->priority_;
100 TAO_END_VERSIONED_NAMESPACE_DECL