2 // -- PortableServer Include --
3 #include "tao/PortableServer/POA_Current.h"
4 #include "tao/PortableServer/POA_Current_Impl.h"
7 #include "tao/TSS_Resources.h"
9 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
13 namespace Portable_Server
15 PortableServer::POA_ptr
16 POA_Current::get_POA ()
18 POA_Current_Impl
*impl
= this->implementation ();
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 ();
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 ();
41 throw PortableServer::Current::NoContext ();
42 return impl
->get_servant ();
46 POA_Current::get_reference ()
48 POA_Current_Impl
*impl
= this->implementation ();
51 throw PortableServer::Current::NoContext ();
52 return impl
->get_reference ();
56 POA_Current::implementation ()
58 return static_cast <POA_Current_Impl
*>
59 (TAO_TSS_Resources::instance ()->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
;
76 TAO_END_VERSIONED_NAMESPACE_DECL