Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / tao / PortableServer / POA_Current.cpp
blobcdb6a81c23c5569f85234ce1aee42e0db764e2e6
1 // -*- C++ -*-
2 // -- PortableServer Include --
3 #include "tao/PortableServer/POA_Current.h"
4 #include "tao/PortableServer/POA_Current_Impl.h"
6 // -- TAO Include --
7 #include "tao/TSS_Resources.h"
9 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
11 namespace TAO
13 namespace Portable_Server
15 PortableServer::POA_ptr
16 POA_Current::get_POA ()
18 POA_Current_Impl *impl = this->implementation ();
20 if (impl == 0)
21 throw PortableServer::Current::NoContext ();
22 return impl->get_POA ();
25 PortableServer::ObjectId *
26 POA_Current::get_object_id ()
28 POA_Current_Impl *impl = this->implementation ();
30 if (impl == 0)
31 throw PortableServer::Current::NoContext ();
32 return impl->get_object_id ();
35 PortableServer::Servant
36 POA_Current::get_servant ()
38 POA_Current_Impl *impl = this->implementation ();
40 if (impl == 0)
41 throw PortableServer::Current::NoContext ();
42 return impl->get_servant ();
45 CORBA::Object_ptr
46 POA_Current::get_reference ()
48 POA_Current_Impl *impl = this->implementation ();
50 if (impl == 0)
51 throw PortableServer::Current::NoContext ();
52 return impl->get_reference ();
55 POA_Current_Impl *
56 POA_Current::implementation ()
58 return static_cast <POA_Current_Impl *>
59 (TAO_TSS_Resources::instance ()->poa_current_impl_);
62 POA_Current_Impl *
63 POA_Current::implementation (POA_Current_Impl *new_current)
65 TAO_TSS_Resources *tss = TAO_TSS_Resources::instance ();
67 POA_Current_Impl *old =
68 static_cast <POA_Current_Impl *>
69 (tss->poa_current_impl_);
70 tss->poa_current_impl_ = new_current;
71 return old;
76 TAO_END_VERSIONED_NAMESPACE_DECL