00001 #include "tao/PortableServer/Regular_POA.h"
00002
00003 ACE_RCSID (PortableServer,
00004 POA,
00005 "$Id: Regular_POA.cpp 78630 2007-06-28 10:34:07Z johnnyw $")
00006
00007 #if !defined (__ACE_INLINE__)
00008 # include "tao/PortableServer/Regular_POA.inl"
00009 #endif
00010
00011 #if !defined (CORBA_E_MICRO)
00012
00013 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00014
00015 TAO_Regular_POA::TAO_Regular_POA (const TAO_Root_POA::String &name,
00016 PortableServer::POAManager_ptr poa_manager,
00017 const TAO_POA_Policy_Set &policies,
00018 TAO_Root_POA *parent,
00019 ACE_Lock &lock,
00020 TAO_SYNCH_MUTEX &thread_lock,
00021 TAO_ORB_Core &orb_core,
00022 TAO_Object_Adapter *object_adapter
00023 )
00024 : TAO_Root_POA (name,
00025 poa_manager,
00026 policies,
00027 parent,
00028 lock,
00029 thread_lock,
00030 orb_core,
00031 object_adapter
00032 ),
00033 parent_ (parent)
00034 {
00035 }
00036
00037 TAO_Regular_POA::~TAO_Regular_POA (void)
00038 {
00039 }
00040
00041 void
00042 TAO_Regular_POA::remove_from_parent_i (void)
00043 {
00044
00045 if (this->parent_ != 0)
00046 {
00047 int const result = this->parent_->delete_child (this->name_);
00048 if (result != 0)
00049 {
00050 throw ::CORBA::OBJ_ADAPTER ();
00051 }
00052 }
00053 }
00054
00055 CORBA::Boolean
00056 TAO_Regular_POA::root (void) const
00057 {
00058 return (parent_ == 0);
00059 }
00060
00061 char
00062 TAO_Regular_POA::root_key_type (void)
00063 {
00064 if (this->parent_ != 0)
00065 {
00066 return TAO_Root_POA::non_root_key_char ();
00067 }
00068 else
00069 {
00070 return TAO_Root_POA::root_key_type ();
00071 }
00072 }
00073
00074 TAO_END_VERSIONED_NAMESPACE_DECL
00075
00076 #endif