summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-10 21:13:18 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-10 21:13:18 +0000
commite8435bbd28e1ea5e063f7426c6324ff73af29044 (patch)
treea5cdd2b3c00f17f0a670aef7f5b6ddd46d71e56b
parent43b208c7b3bd11e23add0722f4cf11b9ebaa4466 (diff)
downloadATCD-e8435bbd28e1ea5e063f7426c6324ff73af29044.tar.gz
ChangeLogTag: Sat Jul 10 15:30:00 1999 Michael Kircher <mk1@cs.wustl.edu>
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp16
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp25
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp82
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp37
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/tie_si.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_arglist.cpp25
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp34
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_cs.cpp73
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/argument.cpp19
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_ami_cs.cpp16
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp14
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp51
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/cdr_op_ci.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp4
37 files changed, 262 insertions, 237 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp
index c952c2fab35..e6f6867af52 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp
@@ -57,7 +57,7 @@ be_visitor_interface_ih::visit_interface (be_interface *node)
os->indent (); // start with whatever indentation level we are at
- ACE_OS::sprintf (namebuf, "%s", node->flatname ());
+ ACE_OS::sprintf (namebuf, "%s", node->flat_name ());
*os << "//Class " << idl_global->impl_class_prefix ()<<namebuf << idl_global->impl_class_suffix ()<< be_nl;
// now generate the class definition
@@ -73,12 +73,12 @@ be_visitor_interface_ih::visit_interface (be_interface *node)
*os << "public virtual ";
intf = be_interface::narrow_from_decl (node->inherits ()[0]);
- *os << idl_global->impl_class_prefix () << intf->flatname () << idl_global->impl_class_suffix ();//intf->relative_skel_name (node->full_skel_name ());
+ *os << idl_global->impl_class_prefix () << intf->flat_name () << idl_global->impl_class_suffix ();//intf->relative_skel_name (node->full_skel_name ());
for (i = 1; i < node->n_inherits (); i++)
{
*os << ", public virtual ";
intf = be_interface::narrow_from_decl (node->inherits ()[i]);
- *os << idl_global->impl_class_prefix () <<intf->flatname () << idl_global->impl_class_suffix ();//intf->relative_skel_name (node->full_skel_name ());
+ *os << idl_global->impl_class_prefix () <<intf->flat_name () << idl_global->impl_class_suffix ();//intf->relative_skel_name (node->full_skel_name ());
} // end of for loop
//inherit from the base skeleton file
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp
index 21c3ebb6245..466396420f5 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp
@@ -56,7 +56,7 @@ be_visitor_interface_is::visit_interface (be_interface *node)
// constructor
*os << "// Implementation skeleton constructor" << be_nl;
// find if we are at the top scope or inside some module
- *os << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () <<"::" << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () <<
+ *os << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () <<"::" << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () <<
" (void)" << be_idt_nl;
@@ -72,7 +72,7 @@ be_visitor_interface_is::visit_interface (be_interface *node)
os->indent ();
*os << "// Implementation skeleton destructor" << be_nl;
- *os << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () <<"::~" << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () <<
+ *os << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () <<"::~" << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () <<
" (void)" << be_idt_nl;
*os << "{" <<be_nl;
@@ -82,9 +82,9 @@ be_visitor_interface_is::visit_interface (be_interface *node)
{
*os << "//Implementation Skeleton Copy Constructor" << be_nl;
- *os <<idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () <<"::"
- << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () << " (const "
- << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () << "& t)"<< be_idt_nl;
+ *os <<idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () <<"::"
+ << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () << " (const "
+ << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () << "& t)"<< be_idt_nl;
if(node->n_inherits () >0)
{
node->gen_copy_ctors(os);
@@ -98,9 +98,9 @@ be_visitor_interface_is::visit_interface (be_interface *node)
{
*os << "//Implementation Skeleton Copy Assignment" << be_nl;
- *os << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () << "& "
- << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () << "::operator=(const "
- << idl_global->impl_class_prefix () << node->flatname () << idl_global->impl_class_suffix () << "& t)" <<be_idt_nl
+ *os << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () << "& "
+ << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () << "::operator=(const "
+ << idl_global->impl_class_prefix () << node->flat_name () << idl_global->impl_class_suffix () << "& t)" <<be_idt_nl
<< "{" << be_idt_nl
<< "return *this;" << be_uidt_nl
<< "}" << be_nl << be_uidt_nl;
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
index a12411dae6d..b9816e9233c 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
@@ -62,11 +62,11 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
if (!node->is_nested ())
{
// we are outermost
- ACE_OS::sprintf (namebuf, "POA_%s", node->local_name ()->get_string ());
+ ACE_OS::sprintf (namebuf, "POA_%s", node->local_name ());
}
else
{
- ACE_OS::sprintf (namebuf, "%s", node->local_name ()->get_string ());
+ ACE_OS::sprintf (namebuf, "%s", node->local_name ());
}
*os << "class " << namebuf << ";" << be_nl;
@@ -149,7 +149,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
<< ");\n" << be_uidt_nl;
// Print out the _this() method.
- *os << node->name () << " *_this (" << be_idt << be_idt_nl
+ *os << node->full_name () << " *_this (" << be_idt << be_idt_nl
<< "CORBA::Environment &ACE_TRY_ENV = " << be_idt_nl
<< "TAO_default_environment ()"
<< be_uidt << be_uidt_nl
@@ -180,16 +180,19 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
-1);
}
-
*os << be_uidt_nl << "};\n\n";
+
be_visitor_context ctx (*this->ctx_);
be_visitor *visitor = 0;
-
+
// generate the collocated class
if (idl_global->gen_thru_poa_collocation ())
{
- ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CH);
+ else
+ ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH);
visitor = tao_cg->make_visitor (&ctx);
if (!visitor || (node->accept (visitor) == -1))
{
@@ -200,12 +203,17 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
"codegen for thru_poa_collocated class failed\n"),
-1);
}
+ delete visitor;
+ visitor = 0;
}
if (idl_global->gen_direct_collocation ())
{
ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CH);
+ else
+ ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH);
visitor = tao_cg->make_visitor (&ctx);
if (!visitor || (node->accept (visitor) == -1))
{
@@ -216,6 +224,8 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
"codegen for direct_collocated class failed\n"),
-1);
}
+ delete visitor;
+ visitor = 0;
}
// generate the TIE class.
@@ -231,6 +241,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
"codegen for TIE class failed\n"),
-1);
}
+ delete visitor;
*os << "\n";
ctx.stream (tao_cg->server_template_header ());
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
index 4443ca6472d..e0dc12e0d26 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
@@ -64,12 +64,11 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
}
// Collocation function pointer initializer.
- *os << node->name () << "_ptr _TAO_collocation_POA_"
- << node->flatname () << "_Stub_Factory (" << be_idt << be_idt_nl
+ *os << node->full_name () << "_ptr _TAO_collocation_POA_"
+ << node->flat_name () << "_Stub_Factory (" << be_idt << be_idt_nl
<< "CORBA::Object_ptr obj" << be_uidt_nl
- << ")\n";
+ << ")" << be_uidt_nl;
- os->incr_indent (0);
*os << "{" << be_idt_nl
<< "TAO_Stub *stub = obj->_stubobj ();" << be_nl << be_nl
<< "switch (stub->servant_orb_var ()->orb_core"
@@ -100,26 +99,22 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< "return 0;" << be_uidt_nl
<< "}\n\n";
- *os << "int _TAO_collocation_POA_" << node->flatname ()
+ *os << "int _TAO_collocation_POA_" << node->flat_name ()
<< "_Stub_Factory_Initializer"
<< " (long dummy)" << be_nl
<< "{" << be_idt_nl
<< "ACE_UNUSED_ARG (dummy);" << be_nl << be_nl
- << "_TAO_collocation_" << node->flatname ()
+ << "_TAO_collocation_" << node->flat_name ()
<< "_Stub_Factory_function_pointer = " << be_idt_nl
- << "_TAO_collocation_POA_" << node->flatname ()
+ << "_TAO_collocation_POA_" << node->flat_name ()
<< "_Stub_Factory;" << be_uidt_nl << be_nl
- << "return 0;" << be_uidt_nl << "}\n\n";
+ << "return 0;" << be_uidt_nl << "}" << be_nl << be_nl;
- *os << "static int _TAO_collocation_POA_" << node->flatname ()
+ *os << "static int _TAO_collocation_POA_" << node->flat_name ()
<< "_Stub_Factory_Initializer_Scarecrow = " << be_idt_nl
- << "_TAO_collocation_POA_" << node->flatname ()
- << "_Stub_Factory_Initializer (ACE_reinterpret_cast "
- << "(long, _TAO_collocation_POA_"
- << node->flatname () << "_Stub_Factory_Initializer));"
- << be_uidt_nl;
-
- os->incr_indent (0);
+ << "_TAO_collocation_POA_" << node->flat_name ()
+ << "_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_"
+ << node->flat_name () << "_Stub_Factory_Initializer));" << be_uidt_nl << be_nl;
// constructor
*os << "// skeleton constructor" << be_nl;
@@ -138,9 +133,9 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
}
*os << "{" << be_idt_nl
- << "this->optable_ = &tao_" << node->flatname ()
+ << "this->optable_ = &tao_" << node->flat_name ()
<< "_optable;" << be_uidt_nl
- << "}\n\n";
+ << "}" << be_nl << be_nl;
*os << "// copy ctor" << be_nl;
// find if we are at the top scope or inside some module
@@ -166,7 +161,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
"be_visitor_interface_ss::visit_interface - "
" copy ctor generation failed\n"), -1);
*os << " TAO_ServantBase (rhs)" << be_uidt_nl
- << "{}\n" << be_nl;
+ << "{}" << be_nl << be_nl;
*os << "// skeleton destructor" << be_nl;
@@ -182,7 +177,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
*os << node->full_skel_name () << "::~" << node->local_name () <<
" (void)" << be_nl;
}
- *os << "{\n";
+ *os << "{" << be_nl;
*os << "}\n\n";
@@ -220,11 +215,10 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
*os << "TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();" << be_nl;
*os << "if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval))))" << be_idt_nl;
*os << "ACE_THROW (CORBA::MARSHAL ());" << be_uidt << be_uidt_nl;
- *os << "}\n\n";
+ *os << "}" << be_nl << be_nl;
// generate code for the _non_existent skeleton
- os->indent ();
*os << "void " << node->full_skel_name ()
<< "::_non_existent_skel (" << be_idt << be_idt_nl
<< "CORBA::ServerRequest &_tao_server_request, " << be_nl
@@ -242,10 +236,8 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
*os << "TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();" << be_nl;
*os << "if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval))))" << be_idt_nl;
*os << "ACE_THROW (CORBA::MARSHAL ());" << be_uidt << be_uidt_nl;
- *os << "}\n\n";
-
+ *os << "}" << be_nl << be_nl;
- os->indent ();
*os << "CORBA::Boolean " << node->full_skel_name ()
<< "::_is_a (" << be_idt << be_idt_nl
<< "const char* value," << be_nl
@@ -268,15 +260,14 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< be_idt_nl << "return 1;" << be_uidt_nl
<< "else" << be_idt_nl
<< "return 0;" << be_uidt << be_uidt << be_uidt_nl
- << "}\n\n";
+ << "}" << be_nl << be_nl;
// the downcast method.
- os->indent ();
*os << "void* " << node->full_skel_name ()
<< "::_downcast (" << be_idt << be_idt_nl
<< "const char* logical_type_id" << be_uidt_nl
<< ")" << be_uidt_nl
- << "{" << be_idt_nl;
+ << "{\n" << be_idt;
if (node->traverse_inheritance_graph (be_interface::downcast_helper, os) == -1)
{
@@ -287,22 +278,20 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
-1);
}
+ os->indent ();
*os << "if (ACE_OS::strcmp (logical_type_id, "
<< "\"IDL:omg.org/CORBA/Object:1.0\") == 0)" << be_idt_nl
<< "return ACE_static_cast(PortableServer::Servant, this);"
<< be_uidt_nl;
*os << "return 0;" << be_uidt_nl
- << "}\n\n";
-
+ << "}" << be_nl << be_nl;
// now the dispatch method
- os->indent ();
*os << "void " << node->full_skel_name () <<
"::_dispatch (CORBA::ServerRequest &req, " <<
"void *context, CORBA::Environment &ACE_TRY_ENV)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
+ *os << "{" << be_idt_nl;
*os << "TAO_Skeleton skel; // pointer to skeleton for operation" << be_nl;
*os << "const char *opname = req.operation (); // retrieve operation name"
<< be_nl;
@@ -317,22 +306,17 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
*os << "}" << be_nl;
*os << "else" << be_idt_nl;
*os << "skel (req, this, context, ACE_TRY_ENV);" << be_uidt << be_uidt_nl;
- *os << "}\n\n";
+ *os << "}" << be_nl << be_nl;
- os->indent ();
*os << "const char* " << node->full_skel_name ()
<< "::_interface_repository_id (void) const"
<< be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return \"" << node->repoID () << "\";\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- *os << "\n";
+ *os << "{" << be_idt_nl;
+ *os << "return \"" << node->repoID () << "\";" << be_uidt_nl;
+ *os << "}" << be_nl << be_nl;
// the _this () operation
- *os << node->name () << "*" << be_nl
+ *os << node->full_name () << "*" << be_nl
<< node->full_skel_name ()
<< "::_this (CORBA_Environment &ACE_TRY_ENV)" << be_nl
<< "{" << be_idt_nl
@@ -365,13 +349,14 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
// the _create_collocated_objref method. If the idl compiler does
// not generate the type of collocated stub but the orb is asking
// for it, simply return null so a remote stub will be used.
- os->indent ();
-
// generate the collocated class impl
if (idl_global->gen_thru_poa_collocation ())
{
be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS);
+ else
+ ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS);
be_visitor *visitor = tao_cg->make_visitor (&ctx);
if (!visitor)
{
@@ -396,7 +381,10 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
if (idl_global->gen_direct_collocation ())
{
be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS);
+ else
+ ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS);
be_visitor *visitor = tao_cg->make_visitor (&ctx);
if (!visitor)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp
index 33fb7be9f5e..6d2d1112bf4 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp
@@ -46,14 +46,14 @@ int be_visitor_interface_thru_poa_collocated_sh::visit_interface (be_interface *
{
TAO_OutStream *os = this->ctx_->stream ();
- os->gen_ifdef_macro (node->flatname (), "_thru_poa_collocated");
+ os->gen_ifdef_macro (node->flat_name (), "_thru_poa_collocated");
// output the class defn
os->indent ();
*os << "class " << idl_global->export_macro ()
<< " " << node->local_coll_name (be_interface::THRU_POA);
os->incr_indent ();
- *os << " : public virtual " << node->name ();
+ *os << " : public virtual " << node->full_name ();
// generate base classes if any
if (node->n_inherits () > 0)
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp
index d6d869d5553..94d0f2291b8 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp
@@ -44,32 +44,26 @@ be_visitor_interface_thru_poa_collocated_ss::~be_visitor_interface_thru_poa_coll
int be_visitor_interface_thru_poa_collocated_ss::visit_interface (be_interface *node)
{
- TAO_OutStream *os = tao_cg->server_skeletons ();
+ TAO_OutStream *os = this->ctx_->stream ();
this->ctx_->node (node);
+ os->indent ();
*os << node->full_coll_name (be_interface::THRU_POA) << "::"
<< node->local_coll_name (be_interface::THRU_POA) << " (" << be_idt_nl
<< "TAO_Stub *stub" << be_uidt_nl
- << ")\n";
- os->decr_indent (0);
-
- os->incr_indent ();
+ << ")" << be_idt_nl;
if (node->is_nested ())
{
- be_decl* scope =
- be_scope::narrow_from_scope (node->defined_in ())->decl ();
+ be_decl* scope = be_scope::narrow_from_scope (node->defined_in ())->decl ();
- *os << ": ACE_NESTED_CLASS ("
- << scope->name () << ","
- << node->local_name ()
- << ") ()," << be_nl;
+ *os << ": ACE_NESTED_CLASS (" << scope->full_name () << ","
+ << node->local_name () << ") ()," << be_nl;
}
else
{
- *os << ": " << node->name ()
- << " ()," << be_nl;
+ *os << ": " << node->full_name () << " ()," << be_nl;
}
// @@ We should call the constructor for all base classes, since we
@@ -85,13 +79,10 @@ int be_visitor_interface_thru_poa_collocated_ss::visit_interface (be_interface *
-1);
}
- *os << " CORBA_Object (stub, 0, 1)\n";
-
- os->decr_indent ();
- *os << "{\n";
- *os << "}\n\n";
+ *os << " CORBA_Object (stub, 0, 1)" << be_uidt_nl;
- os->indent ();
+ *os << "{" << be_nl;
+ *os << "}" << be_nl << be_nl;
// Generate _is_a implementation.
*os << "CORBA::Boolean " << node->full_coll_name (be_interface::THRU_POA) << "::"
@@ -119,9 +110,7 @@ int be_visitor_interface_thru_poa_collocated_ss::visit_interface (be_interface *
<< "\"" << node->repoID () << "\"" << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl
<< ")->_is_a (logical_type_id, ACE_TRY_ENV);" << be_uidt << be_uidt_nl
- << "}\n\n" << be_uidt_nl;
-
- os->indent ();
+ << "}" << be_uidt_nl << be_nl << be_nl;
// Generate _non_existent implementation.
*os << "CORBA::Boolean " << node->full_coll_name (be_interface::THRU_POA) << "::"
@@ -148,7 +137,7 @@ int be_visitor_interface_thru_poa_collocated_ss::visit_interface (be_interface *
<< "\"" << node->repoID () << "\"" << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl
<< ")->_non_existent (ACE_TRY_ENV);" << be_uidt << be_uidt_nl
- << "}\n\n" << be_uidt_nl;
+ << "}" << be_uidt_nl << be_nl << be_nl;
if (this->visit_scope (node) == -1)
{
@@ -176,7 +165,7 @@ be_visitor_interface_thru_poa_collocated_ss::collocated_ctor_helper (be_interfac
{
be_decl *scope;
scope = be_scope::narrow_from_scope (base->defined_in ())->decl ();
- *os << " ACE_NESTED_CLASS (POA_" << scope->name () << ","
+ *os << " ACE_NESTED_CLASS (POA_" << scope->full_name () << ","
<< base->local_coll_name (be_interface::THRU_POA) << ") (stub)," << be_nl;
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp
index 4892051d8b9..bed27304a98 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp
@@ -63,15 +63,15 @@ be_visitor_interface_tie_sh::visit_interface (be_interface *node)
if (!node->is_nested ())
{
// we are outermost
- ACE_OS::sprintf (namebuf, "POA_%s", node->local_name ()->get_string ());
+ ACE_OS::sprintf (namebuf, "POA_%s", node->local_name ());
ACE_OS::sprintf (tiename, "POA_%s_tie",
- node->local_name ()->get_string ());
+ node->local_name ());
}
else
{
- ACE_OS::sprintf (namebuf, "%s", node->local_name ()->get_string ());
+ ACE_OS::sprintf (namebuf, "%s", node->local_name ());
ACE_OS::sprintf (tiename, "%s_tie",
- node->local_name ()->get_string ());
+ node->local_name ());
}
// now generate the class definition
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/tie_si.cpp b/TAO/TAO_IDL/be/be_visitor_interface/tie_si.cpp
index 6b720a11366..3e48f8cd187 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/tie_si.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_si.cpp
@@ -66,16 +66,16 @@ be_visitor_interface_tie_si::visit_interface (be_interface *node)
if (!node->is_nested ())
{
ACE_OS::sprintf (localskelname, "POA_%s",
- node->local_name ()->get_string ());
+ node->local_name ());
ACE_OS::sprintf (localtiename, "POA_%s_tie",
- node->local_name ()->get_string ());
+ node->local_name ());
}
else
{
ACE_OS::sprintf (localskelname, "%s",
- node->local_name ()->get_string ());
+ node->local_name ());
ACE_OS::sprintf (localtiename, "%s_tie",
- node->local_name ()->get_string ());
+ node->local_name ());
}
if (node->is_nested ())
diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp
index 7591f4d83be..1ecae4bb0a5 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp
@@ -55,7 +55,7 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node)
*os << "class " << node->local_name () << ";" << be_nl;
// generate the ifdefined macro for the _ptr type
- os->gen_ifdef_macro (node->flatname (), "_ptr");
+ os->gen_ifdef_macro (node->flat_name (), "_ptr");
// generate the _ptr declaration
*os << "typedef " << node->local_name () << " *" << node->local_name ()
@@ -64,7 +64,7 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node)
os->gen_endif ();
// enclose under an ifdef macro
- os->gen_ifdef_macro (node->flatname (), "_var");
+ os->gen_ifdef_macro (node->flat_name (), "_var");
// generate the _var declaration
if (node->gen_var_defn () == -1)
@@ -78,7 +78,7 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node)
os->gen_endif ();
// enclose under an ifdef macro
- os->gen_ifdef_macro (node->flatname (), "_out");
+ os->gen_ifdef_macro (node->flat_name (), "_out");
// generate the _out declaration - ORBOS/97-05-15 pg 16-20 spec
if (node->gen_out_defn () == -1)
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_arglist.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_arglist.cpp
index 17283768469..fa0efac3f45 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_arglist.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_arglist.cpp
@@ -61,13 +61,24 @@ be_visitor_operation_ami_arglist::visit_operation (be_operation *node)
if (interface == 0)
cerr << "Invalid interface";
- // AMI Handler argument.
- *os << "AMI_"
- << interface->fullname ()
- << "_Handler_ptr "
- << "_tao_ami_handler"
- << ",\n";
- // #endif /* TAO_IDL_HAS_AMI */
+ // @@ Michael: This is not very nice, but we do not have
+ // a be_interface pointer and therefor no strategy.
+ {
+ char *full_name = 0;
+
+ interface->compute_full_name ("AMI_",
+ "_Handler",
+ full_name);
+ // Genereate scope name.
+ // AMI Handler argument.
+ *os << full_name
+ << "_ptr "
+ << "_tao_ami_handler"
+ << ",\n";
+
+ delete full_name;
+ }
+
// all we do is hand over code generation to our scope
if (this->visit_scope (node) == -1)
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
index 3f87f4430db..37d859136ef 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
@@ -85,7 +85,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
-1);
// Generate the scope::operation name.
- *os << parent->fullname ()
+ *os << parent->full_name ()
<< "::"
<< "sendc_"
<< node->local_name ()->get_string ();
@@ -376,7 +376,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () <<
+ *os << node->flat_name () <<
"_paramdata [] = " << be_nl;
*os << "{\n";
os->incr_indent ();
@@ -397,7 +397,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
}
*os << "\n";
os->decr_indent ();
- *os << "}; // " << node->flatname () << "_paramdata\n\n";
+ *os << "}; // " << node->flat_name () << "_paramdata\n\n";
// Check if this operation raises any exceptions. In that case, we must
// generate a list of exception typecodes. This is not valid for
@@ -430,7 +430,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname ()
+ *os << node->flat_name ()
<< "_calldata = " << be_nl
<< "{"
<< "\"";
@@ -468,7 +468,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () << "_paramdata, ";
+ *os << node->flat_name () << "_paramdata, ";
// insert exception list (if any) - node for attributes
if (this->ctx_->attribute ())
@@ -478,7 +478,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
if (node->exceptions ())
{
*os << node->exceptions ()->length ()
- << ", _tao_" << node->flatname () << "_exceptiondata};\n\n";
+ << ", _tao_" << node->flat_name () << "_exceptiondata};\n\n";
}
else
*os << "0, 0};\n\n";
@@ -544,7 +544,7 @@ be_interpretive_visitor_operation_ami_cs::gen_marshal_and_invoke (be_operation
else
*os << "_get_";
}
- *os << node->flatname () << "_calldata," << be_nl
+ *os << node->flat_name () << "_calldata," << be_nl
<< "_tao_arguments" << be_uidt_nl
<< ");\n";
@@ -674,9 +674,21 @@ be_compiled_visitor_operation_ami_cs::gen_marshal_and_invoke (be_operation *node
// Get the interface.
be_decl *interface = be_interface::narrow_from_scope (node->defined_in ())->decl ();
- *os << "&AMI_" << interface->fullname () << "_Handler" << "::"
- << node->local_name () << "_skel," << be_nl;
-
+ {
+ char *full_name = 0;
+
+ interface->compute_full_name ("AMI_",
+ "_Handler",
+ full_name);
+
+ *os << "&" << full_name << "::"
+ << node->local_name () << "_skel," << be_nl;
+
+ delete full_name;
+ }
+
+
+
// Next argument is the ami handler passed in for this method.
*os << "_tao_ami_handler" << be_uidt_nl
@@ -735,7 +747,7 @@ be_compiled_visitor_operation_ami_cs::gen_marshal_and_invoke (be_operation *node
<< "int _invoke_status =" << be_idt_nl;
if (node->exceptions ())
{
- *os << "_tao_call.invoke (_tao_" << node->flatname ()
+ *os << "_tao_call.invoke (_tao_" << node->flat_name ()
<< "_exceptiondata, "
<< node->exceptions ()->length ()
<< ", ACE_TRY_ENV);";
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp
index 30f38acf344..450e5bd6cb1 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp
@@ -90,7 +90,8 @@ be_visitor_operation_ami_handler_operation_ch::visit_operation (be_operation *no
// Generating the skeleton method.
// Skeleton not necessary for collocated class.
- if (this->ctx_->state () == TAO_CodeGen::TAO_COLLOCATED_AMI_HANDLER_OPERATION_CH)
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CH
+ || this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_CH)
{
return 0;
/* NOT REACHED */
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_cs.cpp
index 89d14a4d74e..d98be024263 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_cs.cpp
@@ -90,8 +90,20 @@ be_visitor_operation_ami_handler_operation_cs::visit_operation (be_operation *no
-1);
}
- // Genereate scope name.
- *os << parent->compute_name ("AMI_", "_Handler");
+ // Here we do not have our overridden be_interface methods,
+ // so the interface type strategy does not work here.
+ // We have to go by foot.
+ {
+ char *full_name = 0;
+
+ parent->compute_full_name ("AMI_",
+ "_Handler",
+ full_name);
+ // Genereate scope name.
+ *os << full_name;
+
+ delete full_name;
+ }
// Generate the operation name.
*os << "::" << node->local_name ();
@@ -374,7 +386,7 @@ be_interpretive_visitor_operation_ami_handler_operation_cs::gen_pre_stub_info (b
else
*os << "_get_";
}
- *os << node->flatname () <<
+ *os << node->flat_name () <<
"_paramdata [] = " << be_nl;
*os << "{\n";
os->incr_indent ();
@@ -397,7 +409,7 @@ be_interpretive_visitor_operation_ami_handler_operation_cs::gen_pre_stub_info (b
os->indent ();
*os << be_nl;
os->decr_indent ();
- *os << "}; // " << node->flatname () << "_paramdata\n\n";
+ *os << "}; // " << node->flat_name () << "_paramdata\n\n";
// Check if this operation raises any exceptions. In that case, we must
// generate a list of exception typecodes. This is not valid for
@@ -430,7 +442,7 @@ be_interpretive_visitor_operation_ami_handler_operation_cs::gen_pre_stub_info (b
else
*os << "_get_";
}
- *os << node->flatname ()
+ *os << node->flat_name ()
<< "_calldata = " << be_nl
<< "{"
<< "\"";
@@ -468,7 +480,7 @@ be_interpretive_visitor_operation_ami_handler_operation_cs::gen_pre_stub_info (b
else
*os << "_get_";
}
- *os << node->flatname () << "_paramdata, ";
+ *os << node->flat_name () << "_paramdata, ";
// insert exception list (if any) - node for attributes
if (this->ctx_->attribute ())
@@ -478,7 +490,7 @@ be_interpretive_visitor_operation_ami_handler_operation_cs::gen_pre_stub_info (b
if (node->exceptions ())
{
*os << node->exceptions ()->length ()
- << ", _tao_" << node->flatname () << "_exceptiondata};\n\n";
+ << ", _tao_" << node->flat_name () << "_exceptiondata};\n\n";
}
else
*os << "0, 0};\n\n";
@@ -546,7 +558,7 @@ gen_marshal_and_invoke (be_operation*node,
else
*os << "_get_";
}
- *os << node->flatname () << "_calldata," << be_nl
+ *os << node->flat_name () << "_calldata," << be_nl
<< "_tao_arguments" << be_uidt_nl
<< ");\n";
@@ -647,8 +659,6 @@ gen_marshal_and_invoke (be_operation *node,
be_type *bt)
{
TAO_OutStream *os = this->ctx_->stream ();
- be_visitor *visitor;
- be_visitor_context ctx;
os->indent ();
@@ -699,43 +709,28 @@ gen_marshal_and_invoke (be_operation *node,
<< be_nl
<< "if (!(\n" << be_idt << be_idt << be_idt;
- // @@ Michael: This has to be replaced witht he code in the
- // "#if 0" clause
- // Marshal the ami result argument, if the return type is not
- // void.
- if (!this->void_return_type (bt))
- {
- os->indent ();
- *os << "(_tao_out << _tao_retval)";
-
- // Print the && if there are OUT or INOUT arguements in the
- // signature.
- if (this->has_param_type (node, AST_Argument::dir_OUT) ||
- this->has_param_type (node, AST_Argument::dir_INOUT))
- *os << " &&\n";
- }
-
-#if 0
- // @@ This for giving the _tao_retval argument only. But
- // this may be needed for some data types.
- // But the one that is above is ok for basic types.
- // @@ We may need to do this.
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_RETVAL_MARSHAL_CS);
+ // demarshal
+ be_visitor_context ctx (*this->ctx_);
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_RETVAL_DEMARSHAL_CS);
ctx.sub_state (TAO_CodeGen::TAO_CDR_OUTPUT);
- visitor = tao_cg->make_visitor (&ctx);
+ be_visitor *visitor = tao_cg->make_visitor (&ctx);
if (!visitor || (node->accept (visitor) == -1))
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_compiled_visitor_operation_ami_handler_operation_cs::"
- "gen_marshal_and_invoke - "
- "codegen for return var in do_static_call failed\n"),
+ "gen_demarshal_params - "
+ "codegen for demarshal failed\n"),
-1);
}
delete visitor;
- visitor = 0;
-#endif /* 0 */
+
+ // Print the && if there are OUT or INOUT arguements in the
+ // signature.
+ if (this->has_param_type (node, AST_Argument::dir_OUT) ||
+ this->has_param_type (node, AST_Argument::dir_INOUT))
+ *os << " &&\n";
+
// Marshal each out and inout argument.
ctx = *this->ctx_;
@@ -774,7 +769,7 @@ gen_marshal_and_invoke (be_operation *node,
{
if (node->exceptions ())
{
- *os << "_tao_call.invoke (_tao_" << node->flatname ()
+ *os << "_tao_call.invoke (_tao_" << node->flat_name ()
<< "_exceptiondata, "
<< node->exceptions ()->length ()
<< ", ACE_TRY_ENV);";
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp
index a36fd00d9a4..c50bd87c007 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp
@@ -61,6 +61,7 @@ be_visitor_operation_argument::post_process (be_decl *bd)
case TAO_CodeGen::TAO_OPERATION_ARG_MARSHAL_SS:
*os << ",\n";
break;
+ case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_COLLOCATED_ARG_UPCALL_CS:
case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARG_UPCALL_CS:
{
// @@ Michael
@@ -68,7 +69,8 @@ be_visitor_operation_argument::post_process (be_decl *bd)
// print a comma for in arguments.
// This is due to the concept of post processing,
// which I was not able to prevent to be executed
- // in the case of in arguments.
+ // in the case of in arguments. Post processing
+ // does always write a comma, though.
be_argument *arg = this->ctx_->be_node_as_argument ();
ACE_ASSERT (arg != 0);
if (arg->direction () != AST_Argument::dir_IN)
@@ -105,7 +107,6 @@ be_visitor_operation_argument::visit_operation (be_operation *node)
{
case TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS:
case TAO_CodeGen::TAO_OPERATION_COLLOCATED_ARG_UPCALL_SS:
- case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARG_UPCALL_CS:
// applicable only to these cases where the actual upcall is made
// last argument is the environment
@@ -115,6 +116,11 @@ be_visitor_operation_argument::visit_operation (be_operation *node)
os->indent ();
*os << "ACE_TRY_ENV";
break;
+ case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_COLLOCATED_ARG_UPCALL_CS:
+ case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARG_UPCALL_CS:
+ os->indent ();
+ *os << "ACE_TRY_ENV";
+ break;
default:
break;
}
@@ -173,9 +179,6 @@ be_visitor_operation_argument::visit_argument (be_argument *node)
case TAO_CodeGen::TAO_AMI_OPERATION_ARG_INVOKE_CS:
ctx.state (TAO_CodeGen::TAO_AMI_ARGUMENT_INVOKE_CS);
break;
-// @@ Michael case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARG_INVOKE_CS:
-// ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_ARGUMENT_INVOKE_CS);
-// break;
case TAO_CodeGen::TAO_OPERATION_ARG_POST_INVOKE_CS:
ctx.state (TAO_CodeGen::TAO_ARGUMENT_POST_INVOKE_CS);
break;
@@ -206,6 +209,9 @@ be_visitor_operation_argument::visit_argument (be_argument *node)
case TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS:
ctx.state (TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS);
break;
+ case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_COLLOCATED_ARG_UPCALL_CS:
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_ARGUMENT_COLLOCATED_UPCALL_CS);
+ break;
case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARG_UPCALL_CS:
ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_ARGUMENT_UPCALL_CS);
break;
@@ -215,9 +221,6 @@ be_visitor_operation_argument::visit_argument (be_argument *node)
case TAO_CodeGen::TAO_OPERATION_ARG_POST_MARSHAL_SS:
ctx.state (TAO_CodeGen::TAO_ARGUMENT_POST_MARSHAL_SS);
break;
- // case TAO_CodeGen::TAO_OPERATION_ARG_AMI:
- // ctx.state (TAO_CodeGen::TAO_ARGUMENT_AMI);
- // break;
default:
{
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp
index 700c11a34ed..756964eacbd 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp
@@ -212,7 +212,7 @@ be_visitor_compiled_args_decl::visit_array (be_array *node)
}
// for anonymous arrays, the type name has a _ prepended. We compute
- // the fullname with or without the underscore and use it later on.
+ // the full_name with or without the underscore and use it later on.
char fname [NAMEBUFSIZE]; // to hold the full and
ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
@@ -228,18 +228,18 @@ be_visitor_compiled_args_decl::visit_array (be_array *node)
{
be_decl *parent =
be_scope::narrow_from_scope (node->defined_in ())->decl ();
- ACE_OS::sprintf (fname, "%s::_%s", parent->fullname (),
+ ACE_OS::sprintf (fname, "%s::_%s", parent->full_name (),
node->local_name ()->get_string ());
}
else
{
- ACE_OS::sprintf (fname, "_%s", node->fullname ());
+ ACE_OS::sprintf (fname, "_%s", node->full_name ());
}
}
else
{
// typedefed node
- ACE_OS::sprintf (fname, "%s", node->fullname ());
+ ACE_OS::sprintf (fname, "%s", node->full_name ());
}
if (f->direction () != AST_Argument::dir_IN)
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp
index 771706f01af..86c35484097 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp
@@ -50,7 +50,7 @@ be_visitor_operation_exceptlist_cs::visit_operation (be_operation *node)
if (node->exceptions ())
{
os->indent ();
- *os << "static TAO_Exception_Data " << "_tao_" << node->flatname ()
+ *os << "static TAO_Exception_Data " << "_tao_" << node->flat_name ()
<< "_exceptiondata [] = " << be_nl;
*os << "{" << be_idt_nl;
// initialize an iterator to iterate thru the exception list
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ami_cs.cpp
index 9db88553f3d..f55999f91f5 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ami_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ami_cs.cpp
@@ -81,7 +81,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
-1);
// Generate the scope::operation name.
- *os << parent->fullname ()
+ *os << parent->full_name ()
<< "::"
<< "sendc_"
<< node->local_name ()->get_string ();
@@ -369,7 +369,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () <<
+ *os << node->flat_name () <<
"_paramdata [] = " << be_nl;
*os << "{\n";
os->incr_indent ();
@@ -390,7 +390,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
}
*os << "\n";
os->decr_indent ();
- *os << "}; // " << node->flatname () << "_paramdata\n\n";
+ *os << "}; // " << node->flat_name () << "_paramdata\n\n";
// Check if this operation raises any exceptions. In that case, we must
// generate a list of exception typecodes. This is not valid for
@@ -423,7 +423,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname ()
+ *os << node->flat_name ()
<< "_calldata = " << be_nl
<< "{"
<< "\"";
@@ -461,7 +461,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () << "_paramdata, ";
+ *os << node->flat_name () << "_paramdata, ";
// insert exception list (if any) - node for attributes
if (this->ctx_->attribute ())
@@ -471,7 +471,7 @@ be_interpretive_visitor_operation_ami_cs::gen_pre_stub_info (be_operation *node,
if (node->exceptions ())
{
*os << node->exceptions ()->length ()
- << ", _tao_" << node->flatname () << "_exceptiondata};\n\n";
+ << ", _tao_" << node->flat_name () << "_exceptiondata};\n\n";
}
else
*os << "0, 0};\n\n";
@@ -537,7 +537,7 @@ be_interpretive_visitor_operation_ami_cs::gen_marshal_and_invoke (be_operation
else
*os << "_get_";
}
- *os << node->flatname () << "_calldata," << be_nl
+ *os << node->flat_name () << "_calldata," << be_nl
<< "_tao_arguments" << be_uidt_nl
<< ");\n";
@@ -731,7 +731,7 @@ be_compiled_visitor_operation_ami_cs::gen_marshal_and_invoke (be_operation
{
if (node->exceptions ())
{
- *os << "_tao_call.invoke (_tao_" << node->flatname ()
+ *os << "_tao_call.invoke (_tao_" << node->flat_name ()
<< "_exceptiondata, "
<< node->exceptions ()->length ()
<< ", ACE_TRY_ENV);";
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
index 980cbb496c8..a0cebee3569 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
@@ -404,7 +404,7 @@ be_interpretive_visitor_operation_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () <<
+ *os << node->flat_name () <<
"_paramdata [] = " << be_nl;
*os << "{\n";
os->incr_indent ();
@@ -425,7 +425,7 @@ be_interpretive_visitor_operation_cs::gen_pre_stub_info (be_operation *node,
}
*os << "\n";
os->decr_indent ();
- *os << "}; // " << node->flatname () << "_paramdata\n\n";
+ *os << "}; // " << node->flat_name () << "_paramdata\n\n";
// Check if this operation raises any exceptions. In that case, we must
// generate a list of exception typecodes. This is not valid for
@@ -458,7 +458,7 @@ be_interpretive_visitor_operation_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname ()
+ *os << node->flat_name ()
<< "_calldata = " << be_nl
<< "{"
<< "\"";
@@ -496,7 +496,7 @@ be_interpretive_visitor_operation_cs::gen_pre_stub_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () << "_paramdata, ";
+ *os << node->flat_name () << "_paramdata, ";
// insert exception list (if any) - node for attributes
if (this->ctx_->attribute ())
@@ -506,7 +506,7 @@ be_interpretive_visitor_operation_cs::gen_pre_stub_info (be_operation *node,
if (node->exceptions ())
{
*os << node->exceptions ()->length ()
- << ", _tao_" << node->flatname () << "_exceptiondata};\n\n";
+ << ", _tao_" << node->flat_name () << "_exceptiondata};\n\n";
}
else
*os << "0, 0};\n\n";
@@ -572,7 +572,7 @@ be_interpretive_visitor_operation_cs::gen_marshal_and_invoke (be_operation
else
*os << "_get_";
}
- *os << node->flatname () << "_calldata," << be_nl
+ *os << node->flat_name () << "_calldata," << be_nl
<< "_tao_arguments" << be_uidt_nl
<< ");\n";
@@ -767,7 +767,7 @@ be_compiled_visitor_operation_cs::gen_marshal_and_invoke (be_operation
{
if (node->exceptions ())
{
- *os << "_tao_call.invoke (_tao_" << node->flatname ()
+ *os << "_tao_call.invoke (_tao_" << node->flat_name ()
<< "_exceptiondata, "
<< node->exceptions ()->length ()
<< ", ACE_TRY_ENV);";
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp
index 65b13c9c93b..82432bef649 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp
@@ -90,12 +90,12 @@ be_visitor_operation_is::visit_operation (be_operation *node)
delete visitor;
- ACE_CString str(node->flatname ());
+ ACE_CString str(node->flat_name ());
int lnmlength = ACE_OS::strlen (node->local_name ()->get_string ());
- int fnmlength = ACE_OS::strlen (node->flatname ());
+ int fnmlength = ACE_OS::strlen (node->flat_name ());
fnmlength--;
char * classname = str.substr (0,(fnmlength-lnmlength) ).rep ();
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
index d4ac4d925ed..172fe6e66a2 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
@@ -406,7 +406,7 @@ be_interpretive_visitor_operation_ss::gen_pre_skel_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () <<
+ *os << node->flat_name () <<
"_paramdata [] = " << be_nl;
*os << "{\n";
os->incr_indent ();
@@ -427,7 +427,7 @@ be_interpretive_visitor_operation_ss::gen_pre_skel_info (be_operation *node,
}
*os << "\n";
os->decr_indent ();
- *os << "}; // " << node->flatname () << "_paramdata\n\n";
+ *os << "}; // " << node->flat_name () << "_paramdata\n\n";
// now generate the calldata table
os->indent ();
@@ -441,7 +441,7 @@ be_interpretive_visitor_operation_ss::gen_pre_skel_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname ()
+ *os << node->flat_name ()
<< "_calldata = " << be_nl
<< "{"
<< "\"";
@@ -479,7 +479,7 @@ be_interpretive_visitor_operation_ss::gen_pre_skel_info (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () << "_paramdata};\n\n";
+ *os << node->flat_name () << "_paramdata};\n\n";
return 0;
}
@@ -506,7 +506,7 @@ be_interpretive_visitor_operation_ss::gen_demarshal_params (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () << "_calldata,\n";
+ *os << node->flat_name () << "_calldata,\n";
// pass the appropriate return value to the demarshal operation
ctx = *this->ctx_;
@@ -572,7 +572,7 @@ be_interpretive_visitor_operation_ss::gen_marshal_params (be_operation *node,
else
*os << "_get_";
}
- *os << node->flatname () << "_calldata,\n";
+ *os << node->flat_name () << "_calldata,\n";
// pass the appropriate return value to the marshal operation
ctx = *this->ctx_;
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp
index 8f4c05ee2a1..c98182f2f24 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp
@@ -63,7 +63,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp
index 8ff1a215796..3e21c77dc46 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp
@@ -63,7 +63,7 @@ be_visitor_sequence_cs::gen_bounded_obj_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp
index 167d7a4b79c..7a6528965b2 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp
@@ -64,7 +64,7 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp
index 0b72e049306..6b9a02512ce 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp
@@ -64,7 +64,7 @@ be_visitor_sequence_cs::gen_bounded_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp
index bc74e1f12de..1ca16ecb0a3 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp
@@ -52,7 +52,7 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp
index 07a34995988..c93c81acee2 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp
@@ -52,7 +52,7 @@ be_visitor_sequence_cs::gen_bounded_str_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp
index 16d8728477c..699d35a414e 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp
@@ -66,7 +66,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp
index 892dce31bd4..8be7242f7ce 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp
@@ -66,7 +66,7 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp
index 9348769b863..954525463c6 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp
@@ -65,7 +65,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp
index c57f5ee63b2..8e8359db59d 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp
@@ -65,7 +65,7 @@ be_visitor_sequence_cs::gen_unbounded_sequence (be_sequence *node)
if (node->is_nested ())
{
ACE_OS::sprintf (full_class_name, "%s::%s",
- be_scope::narrow_from_scope (node->defined_in ())->decl ()->fullname (),
+ be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (),
class_name);
}
else
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
index 26a8f5c15ba..bcccd41dfd2 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
@@ -249,7 +249,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
// end of instantiation
// generate the ifdefined macro for the sequence type
- os->gen_ifdef_macro (node->flatname ());
+ os->gen_ifdef_macro (node->flat_name ());
os->indent (); // start with the current indentation level
@@ -390,7 +390,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
os->gen_endif (); // endif macro
// generate the ifdefined macro for the var type
- os->gen_ifdef_macro (node->flatname (), "_var");
+ os->gen_ifdef_macro (node->flat_name (), "_var");
// generate the var and out types
if (this->gen_var_defn (node) == -1)
@@ -404,7 +404,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
os->gen_endif ();
// generate the ifdefined macro for the _out type
- os->gen_ifdef_macro (node->flatname (), "_out");
+ os->gen_ifdef_macro (node->flat_name (), "_out");
if (this->gen_out_defn (node) == -1)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp
index d30852ffa11..54e6a1d3c44 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp
@@ -63,7 +63,7 @@ be_visitor_sequence_ci::visit_sequence (be_sequence *node)
// end of instantiation
// generate the ifdefined macro for the sequence type
- os->gen_ifdef_macro (node->flatname ());
+ os->gen_ifdef_macro (node->flat_name ());
// all we do is generate the _var and _out implementations
if (this->gen_var_impl (node) == -1)
@@ -180,7 +180,7 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node)
ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_var", node->fullname ());
+ ACE_OS::sprintf (fname, "%s_var", node->full_name ());
ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
ACE_OS::sprintf (lname, "%s_var", node->local_name ()->get_string ());
@@ -420,7 +420,7 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node)
ACE_OS::memset (fname, '\0', NAMEBUFSIZE);
- ACE_OS::sprintf (fname, "%s_out", node->fullname ());
+ ACE_OS::sprintf (fname, "%s_out", node->full_name ());
ACE_OS::memset (lname, '\0', NAMEBUFSIZE);
ACE_OS::sprintf (lname, "%s_out", node->local_name ()->get_string ());
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
index d74ffea45d1..254bfed4526 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
@@ -162,7 +162,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
// end of instantiation
// generate the ifdefined macro for the sequence type
- os->gen_ifdef_macro (node->flatname ());
+ os->gen_ifdef_macro (node->flat_name ());
os->indent (); // start with the current indentation level
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
index 79fd133600f..a99d30f2df8 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
@@ -101,6 +101,11 @@ be_visitor_typecode_defn::visit_type (be_type *node)
{
TAO_OutStream *os = this->ctx_->stream ();
+ char *flat_name = 0;
+ node->compute_flat_name ("AMI_",
+ "_Handler",
+ flat_name);
+
// reset the queue
this->queue_reset (this->tc_queue_);
this->tc_offset_ = 0;
@@ -127,9 +132,9 @@ be_visitor_typecode_defn::visit_type (be_type *node)
// Flat name generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << node->compute_flatname ("AMI_", "_Handler");
+ *os << flat_name;
else
- *os << node->flatname ();
+ *os << node->flat_name ();
*os << "[] =" << be_nl;
*os << "{" << be_idt << "\n";
@@ -161,9 +166,9 @@ be_visitor_typecode_defn::visit_type (be_type *node)
// Flat name generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << node->compute_flatname ("AMI_", "_Handler");
+ *os << flat_name;
else
- *os << node->flatname ();
+ *os << node->flat_name ();
*os << " (";
@@ -201,17 +206,17 @@ be_visitor_typecode_defn::visit_type (be_type *node)
// Flat name generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << node->compute_flatname ("AMI_", "_Handler");
+ *os << flat_name;
else
- *os << node->flatname ();
+ *os << node->flat_name ();
*os << "), (char *) &_oc_";
// Flat name generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << node->compute_flatname ("AMI_", "_Handler");
+ *os << flat_name;
else
- *os << node->flatname ();
+ *os << node->flat_name ();
// Name generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
@@ -246,9 +251,9 @@ be_visitor_typecode_defn::visit_type (be_type *node)
// Flat name generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << node->compute_flatname ("AMI_", "_Handler");
+ *os << flat_name;
else
- *os << node->flatname ();
+ *os << node->flat_name ();
*os << ")" << be_nl;
@@ -275,12 +280,14 @@ be_visitor_typecode_defn::visit_type (be_type *node)
// Flat name generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << node->compute_flatname ("AMI_", "_Handler");
+ *os << flat_name;
else
- *os << node->flatname ();
+ *os << node->flat_name ();
*os << ";\n\n";
}
+
+ delete [] flat_name;
return 0;
}
@@ -2839,6 +2846,11 @@ be_visitor_typecode_defn::gen_repoID (be_decl *node)
TAO_OutStream *os = this->ctx_->stream ();
int flag = 0;
+ char *repoID = 0;
+ node->compute_repoID ("AMI_",
+ "_Handler",
+ repoID);
+
// check if we want to generate optimized typecodes. In such a case, there is
// no need to generate the repoID (unless we are an object reference or an
// exception in which case it is mandatory to have the repository ID)
@@ -2878,7 +2890,7 @@ be_visitor_typecode_defn::gen_repoID (be_decl *node)
// repoID generation.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << node->compute_repoID ("AMI_", "_Handler");
+ *os << repoID;
else
*os << node->repoID ();
@@ -2890,14 +2902,14 @@ be_visitor_typecode_defn::gen_repoID (be_decl *node)
// Unoptimized case.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << (ACE_OS::strlen (node->compute_repoID ("AMI_", "_Handler")) + 1) << ", ";
+ *os << (ACE_OS::strlen (repoID) + 1) << ", ";
else
*os << (ACE_OS::strlen (node->repoID ()) + 1) << ", ";
ACE_CDR::ULong *arr, i, arrlen;
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- (void) this->tc_name2long (node->compute_repoID ("AMI_", "_Handler"), arr, arrlen);
+ (void) this->tc_name2long (repoID, arr, arrlen);
else
(void) this->tc_name2long (node->repoID (), arr, arrlen);
@@ -2908,7 +2920,7 @@ be_visitor_typecode_defn::gen_repoID (be_decl *node)
// Comment.
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DEFN)
- *os << " // repository ID = " << node->compute_repoID ("AMI_", "_Handler");
+ *os << " // repository ID = " << repoID;
else
*os << " // repository ID = " << node->repoID ();
@@ -2916,6 +2928,9 @@ be_visitor_typecode_defn::gen_repoID (be_decl *node)
this->tc_offset_ += (arrlen + 1) * sizeof (ACE_CDR::ULong);
}
*os << "\n";
+
+ delete repoID;
+
return;
}
@@ -3136,8 +3151,8 @@ queue_lookup (ACE_Unbounded_Queue <be_visitor_typecode_defn::QNode *> &queue,
iter.next (addr);
item = *addr;
- if (!ACE_OS::strcmp (item->node->fullname (),
- node->fullname ()))
+ if (!ACE_OS::strcmp (item->node->full_name (),
+ node->full_name ()))
{
// found
return item;
diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ci.cpp
index 969d4216d9b..3465da85363 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ci.cpp
@@ -98,7 +98,7 @@ be_visitor_union_cdr_op_ci::visit_union (be_union *node)
be_type::narrow_from_decl (node->disc_type ());
// Generate a temporary to store the discriminant
- *os << disc_type->fullname ()
+ *os << disc_type->full_name ()
<< " " << "_tao_discriminant;" << be_nl
<< "if ( !(strm >> _tao_discriminant) )" << be_idt_nl
<< "return 0;" << be_uidt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp
index b3d8de89394..6b7f6feb914 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp
@@ -58,7 +58,7 @@ int be_visitor_union_ch::visit_union (be_union *node)
os = this->ctx_->stream ();
// generate the ifdefined macro for the union type
- os->gen_ifdef_macro (node->flatname ());
+ os->gen_ifdef_macro (node->flat_name ());
os->indent (); // start with the current indentation level
*os << "class " << idl_global->export_macro () << " "
<< node->local_name () << ": public TAO_Base_Union " << be_nl
@@ -199,7 +199,7 @@ int be_visitor_union_ch::visit_union (be_union *node)
os->gen_endif ();
// generate the ifdefined macro for the _var type
- os->gen_ifdef_macro (node->flatname (), "_var");
+ os->gen_ifdef_macro (node->flat_name (), "_var");
// generate var defn
if (node->gen_var_defn () == -1)
{
@@ -211,7 +211,7 @@ int be_visitor_union_ch::visit_union (be_union *node)
os->gen_endif ();
// generate the ifdefined macro for the array type
- os->gen_ifdef_macro (node->flatname (), "_out");
+ os->gen_ifdef_macro (node->flat_name (), "_out");
// a class is generated for an out defn only for a variable length struct
if (node->size_type () == be_decl::VARIABLE)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp
index 8790e6a339b..d4327d785a9 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp
@@ -131,7 +131,7 @@ int be_visitor_union_ci::visit_union (be_union *node)
}
// generate the ifdefined macro for the array type
- os->gen_ifdef_macro (node->flatname (), "_var");
+ os->gen_ifdef_macro (node->flat_name (), "_var");
if (node->gen_var_impl () == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -143,7 +143,7 @@ int be_visitor_union_ci::visit_union (be_union *node)
// generate the ifdefined macro for the array type then generate the _out
// impl
- os->gen_ifdef_macro (node->flatname (), "_out");
+ os->gen_ifdef_macro (node->flat_name (), "_out");
if (node->size_type () == be_decl::VARIABLE
&& node->gen_out_impl () == -1)
{