Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tao / PortableServer / Regular_POA.cpp
blob867e819de30f8c67559288288e22520e56e0f258
1 #include "tao/PortableServer/Regular_POA.h"
3 #if !defined (__ACE_INLINE__)
4 # include "tao/PortableServer/Regular_POA.inl"
5 #endif /* ! __ACE_INLINE__ */
7 #if !defined (CORBA_E_MICRO)
9 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
11 TAO_Regular_POA::TAO_Regular_POA (const TAO_Root_POA::String &name,
12 PortableServer::POAManager_ptr poa_manager,
13 const TAO_POA_Policy_Set &policies,
14 TAO_Root_POA *parent,
15 ACE_Lock &lock,
16 TAO_SYNCH_MUTEX &thread_lock,
17 TAO_ORB_Core &orb_core,
18 TAO_Object_Adapter *object_adapter)
19 : TAO_Root_POA (name,
20 poa_manager,
21 policies,
22 parent,
23 lock,
24 thread_lock,
25 orb_core,
26 object_adapter),
27 parent_ (parent)
31 void
32 TAO_Regular_POA::remove_from_parent_i ()
34 // Remove POA from the parent
35 if (this->parent_ != 0)
37 int const result = this->parent_->delete_child (this->name_);
38 if (result != 0)
40 throw ::CORBA::OBJ_ADAPTER ();
45 CORBA::Boolean
46 TAO_Regular_POA::root () const
48 return (parent_ == 0);
51 char
52 TAO_Regular_POA::root_key_type ()
54 if (this->parent_ != 0)
56 return TAO_Root_POA::non_root_key_char ();
58 else
60 return TAO_Root_POA::root_key_type ();
64 TAO_END_VERSIONED_NAMESPACE_DECL
66 #endif