diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp index 5a245b82a30..6cf36f1f4db 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.cpp @@ -469,6 +469,39 @@ TAO_PG_ObjectGroupManager::get_member_ref ( CORBA::Object::_nil ()); } +PortableGroup::ObjectGroup_ptr +TAO_PG_ObjectGroupManager::get_object_group_ref_from_id ( + PortableGroup::ObjectGroupId group_id + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + CORBA::SystemException + , PortableGroup::ObjectGroupNotFound + )) +{ + //@@ If we change the PG's concept of ObjectGroupId from + // PortableServer::ObjectId to PortableGroup::ObjectGroupId, can + // just call TAO_PG_ObjectGroupManager::object_group() here. + + TAO_PG_ObjectGroup_Map_Entry * group_entry = 0; + { + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, + guard, + this->lock_, + PortableGroup::ObjectGroup::_nil ()); + + if (this->object_group_map_.find (group_id, group_entry) != 0) + ACE_THROW_RETURN (PortableGroup::ObjectGroupNotFound (), + PortableGroup::ObjectGroup::_nil ()); + } + + if (group_entry == 0) + ACE_THROW_RETURN (CORBA::INTERNAL (), + PortableGroup::ObjectGroup::_nil ()); + + return + PortableGroup::ObjectGroup::_duplicate (group_entry->object_group.in ()); +} PortableGroup::ObjectGroup_ptr TAO_PG_ObjectGroupManager::create_object_group ( |