summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp')
-rw-r--r--TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp90
1 files changed, 43 insertions, 47 deletions
diff --git a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
index 8e980c90a93..4dadcf226da 100644
--- a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
+++ b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
@@ -17,7 +17,7 @@
#include "ast_eventtype_fwd.h"
#include "ast_exception.h"
#include "ast_expression.h"
-#include "ast_finder.h"
+#include "ast_factory.h"
#include "ast_field.h"
#include "ast_home.h"
#include "ast_interface.h"
@@ -52,13 +52,16 @@
#include "ace/Vector_T.h"
-ifr_adding_visitor::ifr_adding_visitor (
- AST_Decl *scope,
- bool in_reopened,
- bool allow_duplicate_typedefs)
+ACE_RCSID (IFR_Service,
+ ifr_adding_visitor,
+ "$Id$")
+
+ifr_adding_visitor::ifr_adding_visitor (AST_Decl *scope,
+ bool in_reopened,
+ bool allow_duplicate_typedefs)
: scope_ (scope),
- in_reopened_ (in_reopened),
- allow_duplicate_typedefs_ (allow_duplicate_typedefs)
+ in_reopened_ (in_reopened),
+ allow_duplicate_typedefs_ (allow_duplicate_typedefs)
{
}
@@ -579,7 +582,7 @@ ifr_adding_visitor::visit_valuetype (AST_ValueType *node)
try
{
- // Is this valuetype already in the respository?
+ // Is this interface already in the respository?
CORBA::Contained_var prev_def =
be_global->repository ()->lookup_id (node->repoID ());
@@ -1623,6 +1626,12 @@ ifr_adding_visitor::visit_home (AST_Home *node)
}
int
+ifr_adding_visitor::visit_factory (AST_Factory *)
+{
+ return 0;
+}
+
+int
ifr_adding_visitor::visit_structure (AST_Structure *node)
{
if (node->imported () && !be_global->do_included_files ())
@@ -3900,7 +3909,6 @@ ifr_adding_visitor::fill_exceptions (CORBA::ExceptionDefSeq &result,
return;
}
case AST_Decl::NT_factory:
- case AST_Decl::NT_finder:
{
AST_Factory *f = AST_Factory::narrow_from_decl (node);
this->fill_exceptions (result,
@@ -3948,10 +3956,10 @@ ifr_adding_visitor::fill_exceptions (CORBA::ExceptionDefSeq &result,
void
ifr_adding_visitor::fill_params (CORBA::ParDescriptionSeq &result,
- UTL_Scope *node)
+ AST_Operation *node)
{
AST_Argument *arg = 0;
- CORBA::ULong n_args = static_cast<CORBA::ULong> (node->nmembers ());
+ CORBA::ULong n_args = static_cast<CORBA::ULong> (node->argument_count ());
result.length (n_args);
CORBA::ULong index = 0;
CORBA::Contained_var holder;
@@ -3980,33 +3988,26 @@ void
ifr_adding_visitor::visit_all_factories (AST_Home *node,
CORBA::ComponentIR::HomeDef_ptr h)
{
+ AST_Operation **tmp = 0;
CORBA::Contained_var contained;
CORBA::ComponentIR::FactoryDef_var new_def;
- for (UTL_ScopeActiveIterator h_iter (node,
- UTL_Scope::IK_decls);
- !h_iter.is_done ();
- h_iter.next ())
+ for (ACE_Unbounded_Queue_Iterator<AST_Operation *> i (node->factories ());
+ ! i.done ();
+ i.advance ())
{
- AST_Decl *d = h_iter.item ();
- AST_Decl::NodeType nt = d->node_type ();
-
- if (nt != AST_Decl::NT_factory)
- {
- continue;
- }
-
- AST_Factory *f = AST_Factory::narrow_from_decl (d);
-
+ i.next (tmp);
CORBA::ParDescriptionSeq params;
- this->fill_params (params, f);
+ this->fill_params (params,
+ *tmp);
CORBA::ExceptionDefSeq exceptions;
- this->fill_exceptions (exceptions, f);
+ this->fill_exceptions (exceptions,
+ *tmp);
- new_def = h->create_factory (f->repoID (),
- f->local_name ()->get_string (),
- f->version (),
+ new_def = h->create_factory ((*tmp)->repoID (),
+ (*tmp)->local_name ()->get_string (),
+ (*tmp)->version (),
params,
exceptions);
}
@@ -4016,31 +4017,26 @@ void
ifr_adding_visitor::visit_all_finders (AST_Home *node,
CORBA::ComponentIR::HomeDef_ptr h)
{
- AST_Finder *f = 0;
+ AST_Operation **tmp = 0;
CORBA::Contained_var contained;
CORBA::ComponentIR::FinderDef_var new_def;
- for (UTL_ScopeActiveIterator h_iter (node,
- UTL_Scope::IK_decls);
- !h_iter.is_done ();
- h_iter.next ())
+ for (ACE_Unbounded_Queue_Iterator<AST_Operation *> i (node->finders ());
+ ! i.done ();
+ i.advance ())
{
- f = AST_Finder::narrow_from_decl (h_iter.item ());
-
- if (f == 0)
- {
- continue;
- }
-
+ i.next (tmp);
CORBA::ParDescriptionSeq params;
- this->fill_params (params, f);
+ this->fill_params (params,
+ *tmp);
CORBA::ExceptionDefSeq exceptions;
- this->fill_exceptions (exceptions, f);
+ this->fill_exceptions (exceptions,
+ *tmp);
- new_def = h->create_finder (f->repoID (),
- f->local_name ()->get_string (),
- f->version (),
+ new_def = h->create_finder ((*tmp)->repoID (),
+ (*tmp)->local_name ()->get_string (),
+ (*tmp)->version (),
params,
exceptions);
}