blob: 8be5ab21972a1c38eae41aad910e9dcc0727e4a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
// -*- C++ -*-
#include "tao/SystemException.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
{
namespace Portable_Server
{
ACE_INLINE void
POA_Current_Impl::poa (::TAO_Root_POA *p)
{
this->poa_ = p;
}
ACE_INLINE ::TAO_Root_POA *
POA_Current_Impl::poa () const
{
return this->poa_;
}
ACE_INLINE void
POA_Current_Impl::object_id (const PortableServer::ObjectId &id)
{
if (this->object_id_.release () ||
this->object_id_.get_buffer() == this->object_id_buf_)
{
// Resize the current object_id_. If it is less than the
// length of the current buffer, no allocation will take place.
CORBA::ULong id_size = id.length ();
this->object_id_.length (id_size);
// Get the buffer and copy the new object id in it's place.
ACE_OS::memcpy (this->object_id_.get_buffer (),
id.get_buffer (), id_size);
}
else
{
this->object_id_ = id;
}
}
ACE_INLINE const PortableServer::ObjectId &
POA_Current_Impl::object_id () const
{
return this->object_id_;
}
ACE_INLINE void
POA_Current_Impl::replace_object_id (
const PortableServer::ObjectId &system_id)
{
// This has the effect of replacing the underlying buffer
// with that of another object id without copying.
object_id_.replace (system_id.maximum (),
system_id.length (),
const_cast <CORBA::Octet *> (system_id.get_buffer ()),
0);
}
ACE_INLINE void
POA_Current_Impl::object_key (const TAO::ObjectKey &key)
{
this->object_key_ = &key;
}
ACE_INLINE const TAO::ObjectKey &
POA_Current_Impl::object_key () const
{
return *this->object_key_;
}
ACE_INLINE void
POA_Current_Impl::servant (PortableServer::Servant servant)
{
this->servant_ = servant;
}
ACE_INLINE PortableServer::Servant
POA_Current_Impl::servant () const
{
return this->servant_;
}
ACE_INLINE void
POA_Current_Impl::priority (CORBA::Short priority)
{
this->priority_ = priority;
}
ACE_INLINE CORBA::Short
POA_Current_Impl::priority () const
{
return this->priority_;
}
}
}
TAO_END_VERSIONED_NAMESPACE_DECL
|