blob: 09a8f02134c36dd0bf050de859a367d1197a3891 (
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
|
// $Id$
// -- PortableServer Include --
#include "POA_Current.h"
#include "POA_Current_Impl.h"
// -- TAO Include --
#include "tao/TSS_Resources.h"
#if !defined (__ACE_INLINE__)
# include "POA_Current.inl"
#endif /* __ACE_INLINE__ */
ACE_RCSID (PortableServer,
POA_Current,
"$Id$")
namespace TAO
{
namespace Portable_Server
{
PortableServer::POA_ptr
POA_Current::get_POA (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::Current::NoContext))
{
POA_Current_Impl *impl = this->implementation ();
if (impl == 0)
ACE_THROW_RETURN (PortableServer::Current::NoContext (),
0);
return impl->get_POA ();
}
PortableServer::ObjectId *
POA_Current::get_object_id (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::Current::NoContext))
{
POA_Current_Impl *impl = this->implementation ();
if (impl == 0)
ACE_THROW_RETURN (PortableServer::Current::NoContext (),
0);
return impl->get_object_id ();
}
PortableServer::Servant
POA_Current::get_servant (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::Current::NoContext))
{
POA_Current_Impl *impl = this->implementation ();
if (impl == 0)
ACE_THROW_RETURN (PortableServer::Current::NoContext (),
0);
return impl->get_servant ();
}
POA_Current_Impl *
POA_Current::implementation (void)
{
return static_cast <POA_Current_Impl *>
(TAO_TSS_Resources::instance ()->poa_current_impl_);
}
POA_Current_Impl *
POA_Current::implementation (POA_Current_Impl *new_current)
{
TAO_TSS_Resources *tss =
TAO_TSS_Resources::instance ();
POA_Current_Impl *old =
static_cast <POA_Current_Impl *>
(tss->poa_current_impl_);
tss->poa_current_impl_ = new_current;
return old;
}
}
}
|