summaryrefslogtreecommitdiff
path: root/TAO_IDL/be/be_visitor_component/component_exs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO_IDL/be/be_visitor_component/component_exs.cpp')
-rw-r--r--TAO_IDL/be/be_visitor_component/component_exs.cpp73
1 files changed, 70 insertions, 3 deletions
diff --git a/TAO_IDL/be/be_visitor_component/component_exs.cpp b/TAO_IDL/be/be_visitor_component/component_exs.cpp
index f5e01b0641c..38b2f4ed57f 100644
--- a/TAO_IDL/be/be_visitor_component/component_exs.cpp
+++ b/TAO_IDL/be/be_visitor_component/component_exs.cpp
@@ -34,11 +34,11 @@ be_visitor_component_exs::visit_component (be_component *node)
/// CIDL-generated namespace used 'CIDL_' + composition name.
/// Now we use 'CIAO_' + component's flat name.
- os_ << be_nl << be_nl
+ os_ << be_nl_2
<< "namespace CIAO_" << node->flat_name ()
<< "_Impl" << be_nl
<< "{" << be_idt;
-
+
be_visitor_facet_exs facet_visitor (this->ctx_);
facet_visitor.node (node);
@@ -50,8 +50,9 @@ be_visitor_component_exs::visit_component (be_component *node)
ACE_TEXT ("facet visitor failed\n")),
-1);
}
-
+
be_visitor_executor_exs exec_visitor (this->ctx_);
+ exec_visitor.node (node);
if (exec_visitor.visit_component (node) == -1)
{
@@ -62,6 +63,72 @@ be_visitor_component_exs::visit_component (be_component *node)
-1);
}
+ /// Generate the empty ops for the AMI4CCM reply handlers,
+ /// if any.
+ for (ACE_Unbounded_Queue<char *>::CONST_ITERATOR i (
+ idl_global->ciao_ami_recep_names ());
+ ! i.done ();
+ i.advance ())
+ {
+ char **item = 0;
+ i.next (item);
+
+ UTL_ScopedName *sn =
+ FE_Utils::string_to_scoped_name (*item);
+
+ UTL_Scope *s =
+ idl_global->scopes ().top_non_null ();
+
+ AST_Decl *d = s->lookup_by_name (sn, true);
+
+ if (d == 0)
+ {
+ idl_global->err ()->lookup_error (sn);
+
+ sn->destroy ();
+ delete sn;
+ sn = 0;
+
+ continue;
+ }
+
+ sn->destroy ();
+ delete sn;
+ sn = 0;
+
+ be_uses *u = be_uses::narrow_from_decl (d);
+
+ if (u == 0)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_visitor_component_exs")
+ ACE_TEXT ("::visit_component - ")
+ ACE_TEXT ("narrow to AMI receptacle ")
+ ACE_TEXT ("failed\n")),
+ -1);
+ }
+
+ be_component *c =
+ be_component::narrow_from_decl (
+ ScopeAsDecl (u->defined_in ()));
+
+ if (c == node)
+ {
+ be_visitor_context ctx (*this->ctx_);
+ be_visitor_component_ami_rh_exs ami_rh_visitor (&ctx);
+
+ if (ami_rh_visitor.visit_uses (u) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_visitor_component_exs")
+ ACE_TEXT ("::visit_component - ")
+ ACE_TEXT ("AMI reply handler generation ")
+ ACE_TEXT ("failed\n")),
+ -1);
+ }
+ }
+ }
+
this->gen_exec_entrypoint_defn ();
os_ << be_uidt_nl