summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-01 21:27:04 +0000
committerwilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-01 21:27:04 +0000
commit0c8df4451969e67d6a5dcf97984549268e1b48ad (patch)
tree6be00fca748df3d57e10af1ac7f09891650ce574
parenta923bfba75c60f015cb10451f5cd598fade1ddb8 (diff)
downloadATCD-0c8df4451969e67d6a5dcf97984549268e1b48ad.tar.gz
ChangeLogTag: Mon Dec 1 15:24:27 2003 Dale Wilson <wilson_d@ociweb.com>
-rw-r--r--TAO/ChangeLog9
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp94
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h19
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp2
4 files changed, 17 insertions, 107 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index eff8c04b3ca..159b1637eee 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,12 @@
+Mon Dec 1 15:24:27 2003 Dale Wilson <wilson_d@ociweb.com>
+
+ * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h:
+ * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp:
+ Remove create_member method. It doesn't belong here.
+
+ * orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp:
+ Remove invalid assert.
+
Mon Dec 1 13:24:15 2003 Dale Wilson <wilson_d@ociweb.com>
* orbsvcs/FT_ReplicationManager/FT_ReplicationManager.cpp:
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
index 8d6f3c0ae41..7e91bc1d445 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
@@ -37,7 +37,14 @@ TAO::PG_Group_Factory::PG_Group_Factory ()
TAO::PG_Group_Factory::~PG_Group_Factory (void)
{
- // todo: destroy all members
+ for (Group_Map_Iterator it = this->group_map_.begin ();
+ it != this->group_map_.end ();
+ ++it)
+ {
+ TAO::PG_Object_Group * group = (*it).int_id_;
+ delete group;
+ }
+ this->group_map_.unbind_all ();
}
@@ -145,91 +152,6 @@ void TAO::PG_Group_Factory::delete_group (PortableGroup::ObjectGroupId group_id
}
}
-
-
-
-PortableGroup::GenericFactory::FactoryCreationId *
-TAO::PG_Group_Factory::create_member (
- PortableGroup::ObjectGroup_ptr object_group,
- const PortableGroup::FactoryInfo & factory_info,
- const char * type_id,
- const CORBA::Boolean propagate_member_already_present
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableGroup::NoFactory,
- PortableGroup::ObjectNotCreated,
- PortableGroup::InvalidCriteria,
- PortableGroup::InvalidProperty,
- PortableGroup::CannotMeetCriteria,
- PortableGroup::MemberAlreadyPresent))
-{
- PortableGroup::GenericFactory::FactoryCreationId_var fcid;
-
-#if 0
- CORBA::Object_var member =
- factory_info.the_factory->create_object (type_id,
- factory_info.the_criteria,
- fcid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- ACE_TRY
- {
- // @@ Should an "_is_a()" be performed here? While it
- // appears to be the right thing to do, it can be
- // expensive.
- //
- // Make sure an Object of the correct type was created.
- // It is possible that an object of the wrong type was
- // created if the type_id parameter does not match the
- // type of object the GenericFactory creates.
- CORBA::Boolean right_type_id =
- member->_is_a (type_id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- // @todo Strategize this -- e.g. strict type checking.
- if (!right_type_id)
- {
- // An Object of incorrect type was created. Delete
- // it, and throw a NoFactory exception.
- factory_info.the_factory->delete_object (fcid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_TRY_THROW (PortableGroup::NoFactory (factory_info.the_location,
- type_id));
- }
-
- this->object_group_manager_._tao_add_member (
- object_group,
- factory_info.the_location,
- member.in (),
- type_id,
- propagate_member_already_present
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- // If the member reference is not nil, then the factory
- // was successfully invoked. Since an exception was
- // thrown, clean up the up created member.
- if (!CORBA::is_nil (member.in ()))
- {
- factory_info.the_factory->delete_object (fcid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- ACE_RE_THROW;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (0);
-#endif
- return fcid._retn ();
-}
-
// insert group. Take ownership
int TAO::PG_Group_Factory::insert_group ( ::TAO::PG_Object_Group * group)
{
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h
index 4ae831d0011..8f4252783bb 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h
@@ -102,25 +102,6 @@ namespace TAO
ACE_THROW_SPEC ((CORBA::SystemException,
PortableGroup::ObjectNotFound));
- /**
- * Create a new object group member using the supplied FactoryInfo
- * and RepositoryId and add it to the given object group.
- * @note This method is only used by the infrastructure.
- */
- PortableGroup::GenericFactory::FactoryCreationId * create_member (
- PortableGroup::ObjectGroup_ptr object_group,
- const PortableGroup::FactoryInfo & factory_info,
- const char * type_id,
- const CORBA::Boolean propagate_member_already_present
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableGroup::NoFactory,
- PortableGroup::ObjectNotCreated,
- PortableGroup::InvalidCriteria,
- PortableGroup::InvalidProperty,
- PortableGroup::CannotMeetCriteria,
- PortableGroup::MemberAlreadyPresent));
-
/**
* insert existing group. Take ownership
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
index 633710c88d0..ce2dde39017 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
@@ -577,8 +577,6 @@ void TAO::PG_Object_Group::create_members (size_t count ACE_ENV_ARG_DECL)
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- ACE_ASSERT (!CORBA::_nil (factories.in ()));
-
CORBA::ULong factory_count = factories->length ();
if (factory_count > 0)
{