summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-17 20:37:12 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-17 20:37:12 +0000
commitf63e6597e9995cd70ca8fb5026f615e5530ff7fd (patch)
tree4ea13487c224b0b384ee2ee1adb9c06b7824e50c
parentbc7a92ff48c10e411119dccc3bdf07f2ac7fff80 (diff)
downloadATCD-f63e6597e9995cd70ca8fb5026f615e5530ff7fd.tar.gz
ChangeLogTag: Thu Dec 17 20:35:28 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--modules/TAO/ChangeLog11
-rw-r--r--modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp63
-rw-r--r--modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.h2
-rw-r--r--modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor_operation.cpp2
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 <j.parsons@vanderbilt.edu>
+
+ * 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 <j.parsons@vanderbilt.edu>
+
Wed Dec 16 20:20:13 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
* 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<CORBA::ULong> (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<CORBA::ULong> (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);