From f63e6597e9995cd70ca8fb5026f615e5530ff7fd Mon Sep 17 00:00:00 2001 From: parsons Date: Thu, 17 Dec 2009 20:37:12 +0000 Subject: ChangeLogTag: Thu Dec 17 20:35:28 UTC 2009 Jeff Parsons --- modules/TAO/ChangeLog | 11 ++++ .../TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp | 63 +++++++++++++++------- .../TAO/orbsvcs/IFR_Service/ifr_adding_visitor.h | 2 +- .../IFR_Service/ifr_adding_visitor_operation.cpp | 2 +- 4 files changed, 58 insertions(+), 20 deletions(-) diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog index d466cad0cef..6bb64a29a55 100644 --- a/modules/TAO/ChangeLog +++ b/modules/TAO/ChangeLog @@ -1,3 +1,14 @@ +Thu Dec 17 20:35:28 UTC 2009 Jeff Parsons + + * orbsvcs/IFR_Service/ifr_adding_visitor.h: + * orbsvcs/IFR_Service/ifr_adding_visitor_operation.cpp: + * orbsvcs/IFR_Service/ifr_adding_visitor.cpp: + + Changes to TAO IFR loader required by changes to TAO_IDL + front end in + + Wed Dec 16 20:20:13 UTC 2009 Jeff Parsons + Wed Dec 16 20:20:13 UTC 2009 Jeff Parsons * TAO_IDL/include/ast_generator.h: diff --git a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp index c0f07373932..4dadcf226da 100644 --- a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp +++ b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp @@ -30,6 +30,7 @@ #include "ast_sequence.h" #include "ast_string.h" #include "ast_structure.h" +#include "ast_typedef.h" #include "ast_union.h" #include "ast_union_fwd.h" #include "ast_valuebox.h" @@ -326,7 +327,7 @@ ifr_adding_visitor::visit_interface (AST_Interface *node) bases.length (n_parents); CORBA::Contained_var result; - AST_Interface **parents = node->inherits (); + AST_Type **parents = node->inherits (); // Construct a list of the parents. for (CORBA::ULong i = 0; i < n_parents; ++i) @@ -2740,7 +2741,7 @@ int ifr_adding_visitor::create_interface_def (AST_Interface *node) { CORBA::ULong n_parents = static_cast (node->n_inherits ()); - AST_Interface **parents = node->inherits (); + AST_Type **parents = node->inherits (); CORBA::Contained_var result; CORBA::AbstractInterfaceDefSeq abs_bases; CORBA::InterfaceDefSeq bases; @@ -2752,25 +2753,37 @@ ifr_adding_visitor::create_interface_def (AST_Interface *node) // Construct a list of the parents. for (CORBA::ULong i = 0; i < n_parents; ++i) { + AST_Interface *intf = + AST_Interface::narrow_from_decl (parents[i]); + + if (intf == 0) + { + ACE_ERROR_RETURN (( + LM_ERROR, + ACE_TEXT ("(%N:%l) ifr_adding_visitor::") + ACE_TEXT ("create_interface_def -") + ACE_TEXT (" parent %s is not an interface\n"), + parents[i]->full_name ()), + -1); + } + result = - be_global->repository ()->lookup_id (parents[i]->repoID ()); + be_global->repository ()->lookup_id (intf->repoID ()); // If we got to visit_interface() from a forward declared interface, // this node may not yet be in the repository. if (CORBA::is_nil (result.in ())) { - int status = this->create_interface_def (parents[i]); + int status = this->create_interface_def (intf); if (status != 0) { ACE_ERROR_RETURN (( - LM_ERROR, - ACE_TEXT ("(%N:%l) ifr_adding_visitor::") - ACE_TEXT ("create_interface_def -") - ACE_TEXT (" parent interfacedef creation failed\n") - ), - -1 - ); + LM_ERROR, + ACE_TEXT ("(%N:%l) ifr_adding_visitor::") + ACE_TEXT ("create_interface_def -") + ACE_TEXT (" parent interfacedef creation failed\n")), + -1); } bases[i] = @@ -2802,14 +2815,28 @@ ifr_adding_visitor::create_interface_def (AST_Interface *node) // Construct a list of the parents. for (CORBA::ULong i = 0; i < n_parents; ++i) { + AST_Interface *intf = + AST_Interface::narrow_from_decl (parents[i]); + + if (intf == 0) + { + ACE_ERROR_RETURN (( + LM_ERROR, + ACE_TEXT ("(%N:%l) ifr_adding_visitor::") + ACE_TEXT ("create_interface_def -") + ACE_TEXT (" parent %s is not an interface\n"), + parents[i]->full_name ()), + -1); + } + result = - be_global->repository ()->lookup_id (parents[i]->repoID ()); + be_global->repository ()->lookup_id (intf->repoID ()); // If we got to visit_interface() from a forward declared interface, // this node may not yet be in the repository. if (CORBA::is_nil (result.in ())) { - int status = this->create_interface_def (parents[i]); + int status = this->create_interface_def (intf); if (status != 0) { @@ -3513,7 +3540,7 @@ ifr_adding_visitor::fill_base_value (CORBA::ValueDef_ptr &result, AST_ValueType *node) { result = CORBA::ValueDef::_nil (); - AST_ValueType *base_value = node->inherits_concrete (); + AST_Type *base_value = node->inherits_concrete (); if (base_value == 0) { @@ -3627,7 +3654,7 @@ ifr_adding_visitor::fill_primary_key (CORBA::ValueDef_ptr &result, AST_Home *node) { result = CORBA::ValueDef::_nil (); - AST_ValueType *primary_key = node->primary_key (); + AST_Type *primary_key = node->primary_key (); if (primary_key == 0) { @@ -3664,7 +3691,7 @@ ifr_adding_visitor::fill_abstract_base_values (CORBA::ValueDefSeq &result, // existing entries, if any, from the repository. if (s_length > 0) { - AST_Interface **list = node->inherits (); + AST_Type **list = node->inherits (); CORBA::ULong u_length = static_cast (s_length); bool first_abs = list[0]->is_abstract (); result.length (first_abs ? u_length : u_length - 1); @@ -3701,7 +3728,7 @@ ifr_adding_visitor::fill_supported_interfaces (CORBA::InterfaceDefSeq &result, { result.length (0); CORBA::Long s_length = 0; - AST_Interface **list = 0; + AST_Type **list = 0; switch (node->node_type ()) { @@ -3738,7 +3765,7 @@ ifr_adding_visitor::fill_supported_interfaces (CORBA::InterfaceDefSeq &result, void ifr_adding_visitor::fill_interfaces (CORBA::InterfaceDefSeq &result, - AST_Interface **list, + AST_Type **list, CORBA::Long length) { // Not sure if this could be negative in some default case or diff --git a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.h b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.h index fac79c11d70..79668d18cfc 100644 --- a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.h +++ b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.h @@ -142,7 +142,7 @@ protected: AST_Interface *node); void fill_interfaces (CORBA::InterfaceDefSeq &result, - AST_Interface **list, + AST_Type **list, CORBA::Long length); void fill_initializers (CORBA::ExtInitializerSeq &result, diff --git a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_operation.cpp b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_operation.cpp index 65ea38e73fa..cc872100e0e 100644 --- a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_operation.cpp +++ b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_operation.cpp @@ -83,7 +83,7 @@ ifr_adding_visitor_operation::visit_operation (AST_Operation *node) CORBA::ExceptionDefSeq exceptions (length); exceptions.length (length); - AST_Exception *ex = 0; + AST_Type *ex = 0; CORBA::ULong i = 0; for (UTL_ExceptlistActiveIterator ex_iter (excepts); -- cgit v1.2.1