diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.cpp | 26 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.h | 14 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp | 353 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/InterfaceDef_i.h | 34 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.cpp | 25 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.h | 14 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/Repository_i.cpp | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/ValueDef_i.cpp | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp | 41 |
10 files changed, 460 insertions, 64 deletions
diff --git a/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.cpp b/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.cpp index af9c50b2244..03a5cf38e31 100644 --- a/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.cpp @@ -2,6 +2,7 @@ // $Id$ #include "AbstractInterfaceDef_i.h" +#include "Repository_i.h" ACE_RCSID(IFR_Service, AbstractInterfaceDef_i, "$Id$") @@ -28,3 +29,28 @@ TAO_AbstractInterfaceDef_i::def_kind (CORBA::Environment &) return CORBA::dk_AbstractInterface; } +CORBA::Boolean +TAO_AbstractInterfaceDef_i::is_a (const char *interface_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_a_i (interface_id, + ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_AbstractInterfaceDef_i::is_a_i (const char *interface_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + if (ACE_OS::strcmp (interface_id, "IDL:omg.org/CORBA/AbstractBase:1.0") == 0) + { + return 1; + } + + return this->TAO_InterfaceDef_i::is_a_i (interface_id, + ACE_TRY_ENV); +} + diff --git a/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.h b/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.h index 78860eb9a7d..656adb944c4 100644 --- a/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.h +++ b/TAO/orbsvcs/IFR_Service/AbstractInterfaceDef_i.h @@ -55,6 +55,20 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); // Return our definition kind. + + virtual CORBA::Boolean is_a ( + const char *interface_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + + CORBA::Boolean is_a_i ( + const char *interface_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp index cd5465c1266..03f3f0eb849 100644 --- a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.cpp @@ -190,51 +190,11 @@ CORBA_InterfaceDefSeq * TAO_InterfaceDef_i::base_interfaces_i (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_Configuration_Section_Key inherited_key; - this->repo_->config ()->open_section (this->section_key_, - "inherited", - 0, - inherited_key); - - int index = 0; - int status = 0; - u_int kind = 0; - ACE_Configuration::VALUETYPE type; - ACE_TString section_name, inherited_path; - CORBA::DefinitionKind def_kind = CORBA::dk_none; ACE_Unbounded_Queue<CORBA::DefinitionKind> kind_queue; ACE_Unbounded_Queue<ACE_TString> path_queue; - ACE_Configuration_Section_Key base_key; - - while (this->repo_->config ()->enumerate_values (inherited_key, - index++, - section_name, - type) - == 0) - { - this->repo_->config ()->get_string_value (inherited_key, - section_name.c_str (), - inherited_path); - - status = - this->repo_->config ()->expand_path (this->repo_->root_key (), - inherited_path, - base_key, - 0); - if (status == 0) - { - path_queue.enqueue_tail (inherited_path); - - this->repo_->config ()->get_integer_value (base_key, - "def_kind", - kind); - - def_kind = ACE_static_cast (CORBA::DefinitionKind, kind); - - kind_queue.enqueue_tail (def_kind); - } - } + this->base_interfaces_recursive (kind_queue, + path_queue); size_t size = kind_queue.size (); @@ -287,6 +247,28 @@ TAO_InterfaceDef_i::base_interfaces_i (const CORBA_InterfaceDefSeq &base_interfa CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + // If we are an abstract interface, all our base interfaces must be + // abstract as well. + CORBA::DefinitionKind def_kind = this->def_kind (ACE_TRY_ENV); + ACE_CHECK; + + if (def_kind == CORBA::dk_AbstractInterface) + { + CORBA::ULong length = base_interfaces.length (); + + for (CORBA::ULong i = 0; i < length; ++i) + { + def_kind = base_interfaces[i]->def_kind (ACE_TRY_ENV); + ACE_CHECK; + + if (def_kind != CORBA::dk_AbstractInterface) + { + ACE_THROW (CORBA::BAD_PARAM (11, + CORBA::COMPLETED_NO)); + } + } + } + // Remove the old base interfaces. this->repo_->config ()->remove_section (this->section_key_, "inherited", @@ -354,6 +336,11 @@ TAO_InterfaceDef_i::is_a_i (const char *interface_id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + if (ACE_OS::strcmp (interface_id, "IDL:omg.org/CORBA/Object:1.0") == 0) + { + return 1; + } + CORBA::String_var id = this->id_i (ACE_TRY_ENV); ACE_CHECK_RETURN (0); @@ -442,6 +429,8 @@ TAO_InterfaceDef_i::describe_interface_i (CORBA::Environment &ACE_TRY_ENV) ACE_Unbounded_Queue<ACE_Configuration_Section_Key> key_queue; // Operations + this->inherited_operations (key_queue); + ACE_Configuration_Section_Key ops_key; int status = this->repo_->config ()->open_section (this->section_key_, @@ -488,6 +477,8 @@ TAO_InterfaceDef_i::describe_interface_i (CORBA::Environment &ACE_TRY_ENV) } // Attributes + this->inherited_attributes (key_queue); + ACE_Configuration_Section_Key attrs_key; status = this->repo_->config ()->open_section (this->section_key_, @@ -615,7 +606,14 @@ TAO_InterfaceDef_i::create_attribute_i ( if (bad_params) return CORBA_AttributeDef::_nil (); + + bad_params = this->check_inherited_attrs (name, + ACE_TRY_ENV); + ACE_CHECK_RETURN (CORBA_AttributeDef::_nil ()); + if (bad_params) + return CORBA_AttributeDef::_nil (); + ACE_Configuration_Section_Key attrs_key; // Create/open section for attributes. @@ -653,6 +651,15 @@ TAO_InterfaceDef_i::create_attribute_i ( "mode", mode); + // Create the set and/or get operations for this attribute. + this->create_attr_ops (id, + name, + version, + type, + mode, + ACE_TRY_ENV); + ACE_CHECK_RETURN (CORBA::AttributeDef::_nil ()); + #if 0 // CCM specific. CORBA::ULong i = 0; @@ -1094,3 +1101,265 @@ TAO_InterfaceDef_i::destroy_special (const char *sub_section, } } + +void +TAO_InterfaceDef_i::create_attr_ops (const char *id, + const char *name, + const char *version, + CORBA_IDLType_ptr type, + CORBA::AttributeMode mode, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_CString the_get_name ("_get_"); + + ACE_CString start (id); + + int pos = start.find (name); + + ACE_CString piece (start.substr (pos)); + + ACE_CString the_get_id (start.substr (0, pos) + the_get_name + piece); + + the_get_name += name; + + CORBA_ParDescriptionSeq params (0); + CORBA_ExceptionDefSeq excepts (0); + CORBA_ContextIdSeq contexts (0); + + CORBA_OperationDef_var the_get_op = + this->create_operation_i (the_get_id.c_str (), + the_get_name.c_str (), + version, + type, + CORBA::OP_NORMAL, + params, + excepts, + contexts, + ACE_TRY_ENV); + ACE_CHECK; + + if (mode == CORBA::ATTR_NORMAL) + { + ACE_CString the_set_name ("_set_"); + + ACE_CString the_set_id (start.substr (0, pos) + the_set_name + piece); + + the_set_name += name; + + CORBA_PrimitiveDef_var rettype = + this->repo_->get_primitive (CORBA::pk_void, + ACE_TRY_ENV); + ACE_CHECK; + + params.length (1); + + params[0].name = name; + params[0].type = CORBA::TypeCode::_duplicate (CORBA::_tc_null); + params[0].type_def = CORBA::IDLType::_duplicate (type); + params[0].mode = CORBA::PARAM_IN; + + CORBA_OperationDef_var the_set_op = + this->create_operation_i (the_set_id.c_str (), + the_set_name.c_str (), + version, + rettype.in (), + CORBA::OP_NORMAL, + params, + excepts, + contexts, + ACE_TRY_ENV); + ACE_CHECK; + } +} + +void +TAO_InterfaceDef_i::base_interfaces_recursive ( + ACE_Unbounded_Queue<CORBA::DefinitionKind> &kind_queue, + ACE_Unbounded_Queue<ACE_TString> &path_queue + ) +{ + ACE_Configuration_Section_Key inherited_key; + this->repo_->config ()->open_section (this->section_key_, + "inherited", + 0, + inherited_key); + + int index = 0; + int status = 0; + u_int kind = 0; + ACE_Configuration::VALUETYPE type; + ACE_TString section_name, inherited_path; + CORBA::DefinitionKind def_kind = CORBA::dk_none; + ACE_Configuration_Section_Key base_key; + + while (this->repo_->config ()->enumerate_values (inherited_key, + index++, + section_name, + type) + == 0) + { + this->repo_->config ()->get_string_value (inherited_key, + section_name.c_str (), + inherited_path); + + status = + this->repo_->config ()->expand_path (this->repo_->root_key (), + inherited_path, + base_key, + 0); + + if (status == 0) + { + TAO_InterfaceDef_i tmp (this->repo_, + base_key); + + tmp.base_interfaces_recursive (kind_queue, + path_queue); + + path_queue.enqueue_tail (inherited_path); + + this->repo_->config ()->get_integer_value (base_key, + "def_kind", + kind); + + def_kind = ACE_static_cast (CORBA::DefinitionKind, kind); + + kind_queue.enqueue_tail (def_kind); + } + } +} + +void +TAO_InterfaceDef_i::inherited_attributes ( + ACE_Unbounded_Queue<ACE_Configuration_Section_Key> &key_queue + ) +{ + ACE_Unbounded_Queue<CORBA::DefinitionKind> kind_queue; + ACE_Unbounded_Queue<ACE_TString> path_queue; + + this->base_interfaces_recursive (kind_queue, + path_queue); + + size_t size = path_queue.size (); + ACE_Configuration_Section_Key base_key, attrs_key, attr_key; + int status = 0; + ACE_TString path_name; + u_int count = 0; + + for (size_t i = 0; i < size; ++i) + { + path_queue.dequeue_head (path_name); + + status = + this->repo_->config ()->expand_path (this->repo_->root_key (), + path_name, + base_key, + 0); + + if (status == 0) + { + this->repo_->config ()->open_section (base_key, + "attrs", + 0, + attrs_key); + + this->repo_->config ()->get_integer_value (attrs_key, + "count", + count); + + for (u_int j = 0; j < count; ++j) + { + this->repo_->config ()->open_section (attrs_key, + this->int_to_string (j), + 0, + attr_key); + + key_queue.enqueue_tail (attr_key); + } + } + } +} + +void +TAO_InterfaceDef_i::inherited_operations ( + ACE_Unbounded_Queue<ACE_Configuration_Section_Key> &key_queue + ) +{ + ACE_Unbounded_Queue<CORBA::DefinitionKind> kind_queue; + ACE_Unbounded_Queue<ACE_TString> path_queue; + + this->base_interfaces_recursive (kind_queue, + path_queue); + + size_t size = path_queue.size (); + ACE_Configuration_Section_Key base_key, ops_key, op_key; + int status = 0; + ACE_TString path_name; + u_int count = 0; + + for (size_t i = 0; i < size; ++i) + { + path_queue.dequeue_head (path_name); + + status = + this->repo_->config ()->expand_path (this->repo_->root_key (), + path_name, + base_key, + 0); + + if (status == 0) + { + this->repo_->config ()->open_section (base_key, + "ops", + 0, + ops_key); + + this->repo_->config ()->get_integer_value (ops_key, + "count", + count); + + for (u_int j = 0; j < count; ++j) + { + this->repo_->config ()->open_section (ops_key, + this->int_to_string (j), + 0, + op_key); + + key_queue.enqueue_tail (op_key); + } + } + } +} + +CORBA::Boolean +TAO_InterfaceDef_i::check_inherited_attrs (const char *name, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_Unbounded_Queue<ACE_Configuration_Section_Key> key_queue; + + this->inherited_attributes (key_queue); + + size_t size = key_queue.size (); + ACE_Configuration_Section_Key attr_key; + ACE_TString attr_name; + + for (u_int i = 0; i < size; ++i) + { + key_queue.dequeue_head (attr_key); + + this->repo_->config ()->get_string_value (attr_key, + "name", + attr_name); + + if (attr_name == name) + { + ACE_THROW_RETURN (CORBA::BAD_PARAM (5, + CORBA::COMPLETED_NO), + 1); + } + } + + return 0; +} diff --git a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h index 697866ae605..6cce4cefab1 100644 --- a/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h +++ b/TAO/orbsvcs/IFR_Service/InterfaceDef_i.h @@ -223,6 +223,40 @@ private: ACE_THROW_SPEC ((CORBA::SystemException)); // Removed the repo ids of our attributes and operations from // the flat repo ids section of the repository. + + void create_attr_ops (const char *id, + const char *name, + const char *version, + CORBA_IDLType_ptr type, + CORBA::AttributeMode mode, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)); + // Create set and/or get operations for an attribute. + + void base_interfaces_recursive ( + ACE_Unbounded_Queue<CORBA::DefinitionKind> &kind_queue, + ACE_Unbounded_Queue<ACE_TString> &path_queue + ); + // Depth-first traversal of the inheritance tree to get all + // the base interfaces. + + void inherited_attributes ( + ACE_Unbounded_Queue<ACE_Configuration_Section_Key> &key_queue + ); + // Depth-first traversal of the inheritance tree to get all the + // attributes. + + void inherited_operations ( + ACE_Unbounded_Queue<ACE_Configuration_Section_Key> &key_queue + ); + // Depth-first traversal of the inheritance tree to get all the + // operations. + + CORBA::Boolean check_inherited_attrs (const char *name, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)); + // When creating a new attribute, check for a clash with an inherited + // attribute name. }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.cpp b/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.cpp index c66bb106abe..d51a8959ad4 100644 --- a/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.cpp @@ -2,6 +2,7 @@ // $Id$ #include "LocalInterfaceDef_i.h" +#include "Repository_i.h" ACE_RCSID(IFR_Service, LocalInterfaceDef_i, "$Id$") @@ -28,3 +29,27 @@ TAO_LocalInterfaceDef_i::def_kind (CORBA::Environment &) return CORBA::dk_LocalInterface; } +CORBA::Boolean +TAO_LocalInterfaceDef_i::is_a (const char *interface_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_IFR_READ_GUARD_RETURN (0); + + return this->is_a_i (interface_id, + ACE_TRY_ENV); +} + +CORBA::Boolean +TAO_LocalInterfaceDef_i::is_a_i (const char *interface_id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + if (ACE_OS::strcmp (interface_id, "IDL:omg.org/CORBA/LocalBase:1.0") == 0) + { + return 1; + } + + return this->TAO_InterfaceDef_i::is_a_i (interface_id, + ACE_TRY_ENV); +} diff --git a/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.h b/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.h index 2aec8582da1..a6a178629eb 100644 --- a/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.h +++ b/TAO/orbsvcs/IFR_Service/LocalInterfaceDef_i.h @@ -55,6 +55,20 @@ public: ) ACE_THROW_SPEC ((CORBA::SystemException)); // Return our definition kind. + + virtual CORBA::Boolean is_a ( + const char *interface_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); + + CORBA::Boolean is_a_i ( + const char *interface_id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC ((CORBA::SystemException)); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/IFR_Service/Repository_i.cpp b/TAO/orbsvcs/IFR_Service/Repository_i.cpp index b86b1fea440..d590e317b47 100644 --- a/TAO/orbsvcs/IFR_Service/Repository_i.cpp +++ b/TAO/orbsvcs/IFR_Service/Repository_i.cpp @@ -244,6 +244,12 @@ TAO_Repository_i::lookup_id_i (const char *search_id, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { + if (ACE_OS::strcmp (search_id, "IDL:omg.org/CORBA/Object:1.0") == 0 + || ACE_OS::strcmp (search_id, "IDL:omg.org/CORBA/ValueBase:1.0") == 0) + { + return CORBA_Contained::_nil (); + } + ACE_TString path; if (this->config_->get_string_value (this->repo_ids_key_, search_id, @@ -273,7 +279,7 @@ TAO_Repository_i::lookup_id_i (const char *search_id, ACE_CHECK_RETURN (CORBA_Contained::_nil ()); return CORBA_Contained::_narrow (obj.in (), - ACE_TRY_ENV); + ACE_TRY_ENV); } CORBA::TypeCode_ptr diff --git a/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp b/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp index 1ab27c945a8..383de673459 100644 --- a/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp +++ b/TAO/orbsvcs/IFR_Service/ValueDef_i.cpp @@ -348,10 +348,15 @@ TAO_ValueDef_i::is_a (const char *id, } CORBA::Boolean -TAO_ValueDef_i::is_a_i (const char * /* id */, +TAO_ValueDef_i::is_a_i (const char *id, CORBA::Environment & /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { + if (ACE_OS::strcmp (id, "IDL:omg.org/CORBA/ValueBase:1.0") == 0) + { + return 1; + } + // TODO return 0; } diff --git a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp index 04eaf034d5b..bd7d334fa8b 100644 --- a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp +++ b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp @@ -250,7 +250,7 @@ ifr_adding_visitor::visit_interface (AST_Interface *node) ACE_TRY_CHECK bases[i] = CORBA_InterfaceDef::_narrow (result.in (), - ACE_TRY_ENV); + ACE_TRY_ENV); ACE_TRY_CHECK; if (CORBA::is_nil (bases[i].in ())) diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp index 0a34197ce9e..6dc4f85090b 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp +++ b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp @@ -2279,19 +2279,29 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) ACE_ASSERT (!ACE_OS::strcmp (str.in (), "IDL:p_iface:1.0")); - length = fifd->operations[0].contexts.length (); + length = fifd->operations.length (); if (this->debug_) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nInterfaceDef::describe_interface::") - ACE_TEXT ("operations[0]::contexts::length: %d\n"), + ACE_TEXT ("operations::length: %d\n"), + length)); + + ACE_ASSERT (length == 4); + + length = fifd->operations[3].contexts.length (); + + if (this->debug_) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("\nInterfaceDef::describe_interface::") + ACE_TEXT ("operations[3]::contexts::length: %d\n"), length)); ACE_ASSERT (length == 3); for (i = 0; i < length; i++) { - tmp = fifd->operations[0].contexts[i]; + tmp = fifd->operations[3].contexts[i]; if (this->debug_) ACE_DEBUG ((LM_DEBUG, @@ -2303,7 +2313,7 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) ACE_ASSERT (!ACE_OS::strcmp (tmp, contexts[i])); } - length = fifd->operations[0].exceptions.length (); + length = fifd->operations[3].exceptions.length (); if (this->debug_) ACE_DEBUG ((LM_DEBUG, @@ -2315,11 +2325,11 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) for (i = 0; i < length; i++) { - const char *tmp = fifd->operations[0].exceptions[i].name; + const char *tmp = fifd->operations[3].exceptions[i].name; if (this->debug_) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("InterfaceDef::describe::operations[0]::") + ACE_TEXT ("InterfaceDef::describe::operations[3]::") ACE_TEXT ("contexts[%d]: %s\n"), i, tmp)); @@ -2335,7 +2345,7 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) ACE_TEXT ("attributes::defined_in: %s\n"), tmp)); - ACE_ASSERT (!ACE_OS::strcmp (tmp, "IDL:p_iface:1.0")); + ACE_ASSERT (!ACE_OS::strcmp (tmp, "IDL:gp_iface:1.0")); in_bases[0] = CORBA::InterfaceDef::_duplicate (p_ivar.in ()); @@ -2361,7 +2371,7 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) ACE_TEXT ("base_interfaces::length: %d\n"), length)); - ACE_ASSERT (ifd->base_interfaces.length () == 1); + ACE_ASSERT (length == 2); const char *base_iface_id = 0; @@ -2372,10 +2382,9 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) if (this->debug_) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("InterfaceDef::describe::") - ACE_TEXT ("base_interfaces[0]: %s\n"), + ACE_TEXT ("base_interfaces[%d]: %s\n"), + i, base_iface_id)); - - ACE_ASSERT (ACE_OS::strcmp (base_iface_id, "IDL:p_iface:1.0") == 0); } CORBA::InterfaceDefSeq_var out_bases = ivar->base_interfaces (ACE_TRY_ENV); @@ -2388,7 +2397,7 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) ACE_TEXT ("\nInterfaceDef::base_interfaces::length: %d\n"), length)); - ACE_ASSERT (length == 1); + ACE_ASSERT (length == 2); for (i = 0; i < length; i++) { @@ -2400,8 +2409,6 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) ACE_TEXT ("InterfaceDef::base_interfaces[%d]::name: %s\n"), i, str.in ())); - - ACE_ASSERT (!ACE_OS::strcmp (str.in (), "p_iface")); } CORBA::ContainedSeq_var contents = ivar->contents (CORBA::dk_all, @@ -2416,7 +2423,7 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) ACE_TEXT ("\nInterfaceDef::contents::length: %d\n"), length)); - ACE_ASSERT (length == 3); + ACE_ASSERT (length == 6); for (i = 0; i < length; i++) { @@ -2429,10 +2436,6 @@ Admin_Client::interface_test (CORBA::Environment &ACE_TRY_ENV) i, str.in ())); - ACE_ASSERT (!ACE_OS::strcmp (str.in (), "p_op") - || !ACE_OS::strcmp (str.in (), "p_attr") - || !ACE_OS::strcmp (str.in (), "gp_attr")); - CORBA::Container_var cr = contents[i]->defined_in (ACE_TRY_ENV); ACE_CHECK; |