From 5098324b0d6738ab1239ed2dc1d27fa7350cb7aa Mon Sep 17 00:00:00 2001 From: parsons Date: Thu, 31 Jul 2003 04:02:25 +0000 Subject: ChangeLogTag: Wed Jul 30 23:00:36 2003 Jeff Parsons --- TAO/ChangeLog | 8 +++ .../orbsvcs/IFRService/ComponentContainer_i.cpp | 5 +- .../tests/InterfaceRepo/IDL3_Test/idl3_client.cpp | 64 ++++++++++++++++++++++ TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl | 4 +- 4 files changed, 79 insertions(+), 2 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 65ca5b1950d..7d85e54f402 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,11 @@ +Wed Jul 30 23:00:36 2003 Jeff Parsons + + * orbsvcs/IFRService/ComponentContainer_i.cpp: + * tests/InterfaceRepo/IDL3_Test/idl3_client.cpp: + * tests/InterfaceRepo/IDL3_Test/test.idl: + + More testing and debugging of the IFR's IDL3 support. + Wed Jul 30 22:11:37 2003 Jeff Parsons * orbsvcs/tests/InterfaceRepo/IDL3_Test/IDL3_Test.dsp: diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ComponentContainer_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ComponentContainer_i.cpp index 69633bc51fc..5ce6ad3164e 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ComponentContainer_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ComponentContainer_i.cpp @@ -98,7 +98,10 @@ TAO_ComponentContainer_i::create_component_i ( ACE_CHECK_RETURN (CORBA::ComponentIR::ComponentDef::_nil ()); // Store the id for this - that's what ComponentDescription takes. - const char *base_id = base_component->_interface_repository_id (); + ACE_TString base_id; + this->repo_->config ()->get_string_value (TAO_IFR_Service_Utils::tmp_key_, + "id", + base_id); this->repo_->config ()->set_string_value (new_key, "base_component", base_id); diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp index 86c17bca46f..15a871e26d5 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp +++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp @@ -311,6 +311,70 @@ IDL3_Client::component_inheritance_test ( comp_def->supported_interfaces (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); + CORBA::ULong length = supported->length (); + + if (length != 2) + { + if (this->debug_) + { + ACE_DEBUG ((LM_DEBUG, + "component_test: " + "wrong number of supported interfaces\n")); + } + + return -1; + } + + CORBA::String_var str = supported[1U].in()->id (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + const char *tmp = str.in (); + + if (tmp == 0 || ACE_OS::strcmp (tmp, "IDL:help/c_supp2:1.0") != 0) + { + if (this->debug_) + { + ACE_DEBUG ((LM_DEBUG, + "component_test: " + "bad id on supported interface\n")); + } + + return -1; + } + + CORBA::ComponentIR::ComponentDef_var comp_base = + comp_def->base_component (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + if (CORBA::is_nil (comp_base.in ())) + { + if (this->debug_) + { + ACE_DEBUG ((LM_DEBUG, + "component_test: " + "base component is null\n")); + } + + return -1; + } + + str = comp_base->id (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + + tmp = str.in (); + + if (tmp == 0 || ACE_OS::strcmp (tmp, "IDL:help/c_base:1.0") != 0) + { + if (this->debug_) + { + ACE_DEBUG ((LM_DEBUG, + "component_test: " + "bad id on base component\n")); + } + + return -1; + } + return 0; } diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl index 22704b06266..8954ff268fc 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl +++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/test.idl @@ -11,11 +11,13 @@ module help { interface c_supp1 {}; interface c_supp2 {}; + component c_base {}; }; module mod { - component test_component supports help::c_supp1, help::c_supp2 + component test_component + : help::c_base supports help::c_supp1, help::c_supp2 { attribute long c_attr getraises (help::doh) -- cgit v1.2.1