diff options
author | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-10 21:10:07 +0000 |
---|---|---|
committer | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-10 21:10:07 +0000 |
commit | 43b208c7b3bd11e23add0722f4cf11b9ebaa4466 (patch) | |
tree | cb3cc9167c30a8cdd28a0c6492d59b8cff779d9b | |
parent | 6292889c9201cee4025d840568de41d0645785ae (diff) | |
download | ATCD-43b208c7b3bd11e23add0722f4cf11b9ebaa4466.tar.gz |
ChangeLogTag: Sat Jul 10 15:30:00 1999 Michael Kircher <mk1@cs.wustl.edu>TAO_IDL/be/be_visitor_union/union_ci.cpp
24 files changed, 489 insertions, 171 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index b87ba07a2dd..961a382c8b6 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,119 @@ +Sat Jul 10 15:30:00 1999 Michael Kircher <mk1@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ch.cpp + * TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ch.h: + Added these files to generate AMI Reply Handler code. + + * TAO_IDL/be/be_decl.cpp * TAO_IDL/be/be_helper.cpp * TAO_IDL/be/be_interface.cpp + * TAO_IDL/be/be_interface_fwd.cpp + * TAO_IDL/be/be_predefined_type.cpp + * TAO_IDL/be/be_sequence.cpp + * TAO_IDL/be/be_structure.cpp * TAO_IDL/be/be_type.cpp + * TAO_IDL/be/be_union.cpp + * TAO_IDL/be/be_union_branch.cpp + * TAO_IDL/be/be_valuetype.cpp + * TAO_IDL/be/be_valuetype_fwd.cpp + * TAO_IDL/be/be_visitor_factory.cpp + * TAO_IDL/be/be_visitor_interface.cpp + * TAO_IDL/be/be_visitor_operation.cpp + * TAO_IDL/be/be_visitor_rettype.cpp + * TAO_IDL/be/be_visitor_scope.cpp + * TAO_IDL/be/be_visitor_argument/argument.cpp + * TAO_IDL/be/be_visitor_array/array_ch.cpp + * TAO_IDL/be/be_visitor_array/array_ci.cpp + * TAO_IDL/be/be_visitor_array/array_cs.cpp + * TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp + * TAO_IDL/be/be_visitor_array/cdr_op_ci.cpp + * TAO_IDL/be/be_visitor_exception/ctor_assign.cpp + * TAO_IDL/be/be_visitor_exception/exception_ch.cpp + * TAO_IDL/be/be_visitor_exception/exception_ctor.cpp + * TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp + * TAO_IDL/be/be_visitor_interface/ami_handler_cs.cpp + * TAO_IDL/be/be_visitor_interface/ami_handler_fwd_ch.cpp + * TAO_IDL/be/be_visitor_interface/ami_handler_fwd_ci.cpp + * TAO_IDL/be/be_visitor_interface/ami_handler_servant_ch.cpp + * TAO_IDL/be/be_visitor_interface/ami_handler_servant_cs.cpp + * TAO_IDL/be/be_visitor_interface/ami_handler_stub_ch.cpp + * TAO_IDL/be/be_visitor_interface/ami_handler_stub_cs.cpp + * TAO_IDL/be/be_visitor_interface/any_op_ch.cpp + * TAO_IDL/be/be_visitor_interface/any_op_cs.cpp + * TAO_IDL/be/be_visitor_interface/collocated_ami_handler_ch.cpp + * TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp + * TAO_IDL/be/be_visitor_interface/direct_collocated_ss.cpp + * TAO_IDL/be/be_visitor_interface/interface.cpp + * TAO_IDL/be/be_visitor_interface/interface_ch.cpp + * TAO_IDL/be/be_visitor_interface/interface_ci.cpp + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp + * TAO_IDL/be/be_visitor_interface/interface_ih.cpp + * TAO_IDL/be/be_visitor_interface/interface_is.cpp + * TAO_IDL/be/be_visitor_interface/interface_sh.cpp + * TAO_IDL/be/be_visitor_interface/interface_ss.cpp + * TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp + * TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp + * TAO_IDL/be/be_visitor_interface/tie_sh.cpp + * TAO_IDL/be/be_visitor_interface/tie_si.cpp + * TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp + * TAO_IDL/be/be_visitor_operation/ami_arglist.cpp + * TAO_IDL/be/be_visitor_operation/ami_cs.cpp + * TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp + * TAO_IDL/be/be_visitor_operation/ami_handler_operation_cs.cpp + * TAO_IDL/be/be_visitor_operation/argument.cpp + * TAO_IDL/be/be_visitor_operation/argument_marshal.cpp + * TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp + * TAO_IDL/be/be_visitor_operation/operation_ami_cs.cpp + * TAO_IDL/be/be_visitor_operation/operation_cs.cpp + * TAO_IDL/be/be_visitor_operation/operation_is.cpp + * TAO_IDL/be/be_visitor_operation/operation_ss.cpp + * TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp + * TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp + * TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp + * TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp + * TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp + * TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp + * TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp + * TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp + * TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp + * TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp + * TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp + * TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp + * TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp + * TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp + * TAO_IDL/be/be_visitor_union/cdr_op_ci.cpp + * TAO_IDL/be/be_visitor_union/union_ch.cpp + * TAO_IDL/be/be_visitor_union/union_ci.cpp + * TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp + * TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp + * TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp + * TAO_IDL/be/be_visitor_union_branch/public_ci.cpp + * TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp + * TAO_IDL/be/be_visitor_valuetype/field_cdr_ci.cpp + * TAO_IDL/be/be_visitor_valuetype/field_cs.cpp + * TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp + * TAO_IDL/be/be_visitor_valuetype/valuetype.cpp + * TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp + * TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp + * TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp + * TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp + * TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp + * TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ch.cpp + * TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ci.cpp + * TAO_IDL/be_include/be_codegen.h + * TAO_IDL/be_include/be_decl.h + * TAO_IDL/be_include/be_helper.h + * TAO_IDL/be_include/be_interface.h + * TAO_IDL/be_include/be_visitor_interface.h + * TAO_IDL/be_include/be_visitor_operation.h: + Edited all the files to generate AMI Handler code, I also + changed "fullname ()" methods to "full_name ()" to + be more consistent. The code generation for AMI + Handlers uses a strategy on the be_interface node. + This strategy hides all the differences betwenn + the name generations. + + * tao/PollableC.cpp: + Fixed the the usage of env instead of ACE_TRY_ENV. + + Fri Jul 9 19:12:14 1999 Ossama Othman <othman@cs.wustl.edu> * tao/UIOP_Acceptor.{h,cpp} (open_i, rendezvous_point): diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp index 41084b0b09a..e9fdc5da287 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp @@ -104,18 +104,18 @@ be_visitor_union_branch_cdr_op_ci::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 ()); } // check what is the code generations substate. Are we generating code for diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp index 04e57571655..91ab43e1694 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_access_cs.cpp @@ -141,18 +141,18 @@ be_visitor_union_branch_public_access_cs::visit_array (be_array *node) if (bt->is_nested ()) { be_decl *parent = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - ACE_OS::sprintf (fname, "%s::_%s", parent->fullname (), + ACE_OS::sprintf (fname, "%s::_%s", parent->full_name (), bt->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, "_%s", bt->fullname ()); + ACE_OS::sprintf (fname, "_%s", bt->full_name ()); } } else { // typedefed node - ACE_OS::sprintf (fname, "%s", bt->fullname ()); + ACE_OS::sprintf (fname, "%s", bt->full_name ()); } os = this->ctx_->stream (); diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp index d82862e40c1..b39e689be6c 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp @@ -127,7 +127,7 @@ be_visitor_union_branch_public_assign_cs::visit_array (be_array *node) os = this->ctx_->stream (); // for anonymous arrays, the type name has a _ prepended. We compute the - // fullname with or without the underscore and use it later on. + // full_name with or without the underscore and use it later on. char fname [NAMEBUFSIZE]; // to hold the full and // save the node's local name and full name in a buffer for quick use later @@ -143,18 +143,18 @@ be_visitor_union_branch_public_assign_cs::visit_array (be_array *node) if (bt->is_nested ()) { be_decl *parent = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - ACE_OS::sprintf (fname, "%s::_%s", parent->fullname (), + ACE_OS::sprintf (fname, "%s::_%s", parent->full_name (), bt->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, "_%s", bt->fullname ()); + ACE_OS::sprintf (fname, "_%s", bt->full_name ()); } } else { // typedefed node - ACE_OS::sprintf (fname, "%s", bt->fullname ()); + ACE_OS::sprintf (fname, "%s", bt->full_name ()); } os->indent (); // start from current indentation diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp index 76e4e27d077..24f83f1f29d 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp @@ -131,7 +131,7 @@ be_visitor_union_branch_public_ci::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. + // full_name with or without the underscore and use it later on. char fname [NAMEBUFSIZE]; // to hold the full and // save the node's local name and full name in a buffer for quick use later @@ -147,18 +147,18 @@ be_visitor_union_branch_public_ci::visit_array (be_array *node) if (bt->is_nested ()) { be_decl *parent = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - ACE_OS::sprintf (fname, "%s::_%s", parent->fullname (), + ACE_OS::sprintf (fname, "%s::_%s", parent->full_name (), bt->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, "_%s", bt->fullname ()); + ACE_OS::sprintf (fname, "_%s", bt->full_name ()); } } else { // typedefed node - ACE_OS::sprintf (fname, "%s", bt->fullname ()); + ACE_OS::sprintf (fname, "%s", bt->full_name ()); } // set method diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp index 77c3b394789..62195e9fc7e 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp @@ -125,7 +125,7 @@ be_visitor_union_branch_public_reset_cs::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. + // full_name with or without the underscore and use it later on. char fname [NAMEBUFSIZE]; // to hold the full and // save the node's local name and full name in a buffer for quick use later @@ -141,18 +141,18 @@ be_visitor_union_branch_public_reset_cs::visit_array (be_array *node) if (bt->is_nested ()) { be_decl *parent = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - ACE_OS::sprintf (fname, "%s::_%s", parent->fullname (), + ACE_OS::sprintf (fname, "%s::_%s", parent->full_name (), bt->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, "_%s", bt->fullname ()); + ACE_OS::sprintf (fname, "_%s", bt->full_name ()); } } else { // typedefed node - ACE_OS::sprintf (fname, "%s", bt->fullname ()); + ACE_OS::sprintf (fname, "%s", bt->full_name ()); } os = this->ctx_->stream (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ci.cpp index d8288c7af99..6637b766bf0 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ci.cpp @@ -89,7 +89,7 @@ be_visitor_valuetype_field_cdr_ci::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 // save the node's local name and full name in a buffer for quick @@ -107,18 +107,18 @@ be_visitor_valuetype_field_cdr_ci::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 ()); } // check what is the code generation substate. Are we generating @@ -867,7 +867,7 @@ be_visitor_valuetype_field_cdr_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); @@ -882,18 +882,18 @@ be_visitor_valuetype_field_cdr_decl::visit_array (be_array *node) if (node->is_nested ()) { 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 ()); } // check what is the code generation substate. Are we generating code for diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp index b052358eae7..d1e2c9cdcc3 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp @@ -131,7 +131,7 @@ be_visitor_valuetype_field_cs::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. + // full_name with or without the underscore and use it later on. char fname [NAMEBUFSIZE]; // to hold the full and // save the node's local name and full name in a buffer for quick use later @@ -148,18 +148,18 @@ be_visitor_valuetype_field_cs::visit_array (be_array *node) { be_decl *parent = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - ACE_OS::sprintf (fname, "%s::_%s", parent->fullname (), + ACE_OS::sprintf (fname, "%s::_%s", parent->full_name (), bt->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, "_%s", bt->fullname ()); + ACE_OS::sprintf (fname, "_%s", bt->full_name ()); } } else { // typedefed node - ACE_OS::sprintf (fname, "%s", bt->fullname ()); + ACE_OS::sprintf (fname, "%s", bt->full_name ()); } // set method diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp index 1f7e5405a67..e23026108de 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp @@ -62,7 +62,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) else // only can access base class via virtual function { *os << "if (!this->_tao_marshal__" - << inh->flatname () + << inh->flat_name () << " (strm)) return 0;" << be_nl; } } @@ -104,7 +104,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) else // only can access base class via virtual function { *os << "if (!this->_tao_unmarshal__" - << inh->flatname () + << inh->flat_name () << " (strm)) return 0;" << be_nl; } } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp index 41451082e2d..6553c85e483 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp @@ -819,10 +819,10 @@ be_visitor_valuetype::gen_init_impl (be_valuetype *node) char lname [NAMEBUFSIZE]; // local _out names ACE_OS::memset (fname, '\0', NAMEBUFSIZE); - ACE_OS::sprintf (fname, "%s_init", node->fullname ()); + ACE_OS::sprintf (fname, "%s_init", node->full_name ()); ACE_OS::memset (lname, '\0', NAMEBUFSIZE); - ACE_OS::sprintf (lname, "%s_init", node->local_name ()->get_string ()); + ACE_OS::sprintf (lname, "%s_init", node->local_name ()); // destructor *os << fname << "::~" << lname << " ()" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp index e15b3aedea9..ecaa726fb92 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -62,7 +62,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) *os << "class " << node->local_name () << ";" << be_nl; // 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 declaration if (node->gen_var_defn () == -1) @@ -75,7 +75,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) os->gen_endif (); // generate the ifdef macro for the _out class - 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) @@ -89,7 +89,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) os->gen_endif (); // generate the ifdef macro for the _init class - os->gen_ifdef_macro (node->flatname (), "_init"); + os->gen_ifdef_macro (node->flat_name (), "_init"); // generate the _init declaration - ptc/98-09-03 20.17.10 p.20-93 if (this->gen_init_defn (node) == -1) @@ -103,7 +103,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) os->gen_endif (); // now the valuetype definition itself - os->gen_ifdef_macro (node->flatname ()); + os->gen_ifdef_macro (node->flat_name ()); // now generate the class definition os->indent (); @@ -255,10 +255,10 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) { *os << be_uidt_nl << "protected:" << be_idt_nl; *os << "virtual CORBA::Boolean _tao_marshal__" - << node->flatname () << " (TAO_OutputCDR &) = 0;" + << node->flat_name () << " (TAO_OutputCDR &) = 0;" << be_nl; *os << "virtual CORBA::Boolean _tao_unmarshal__" - << node->flatname () << " (TAO_InputCDR &) = 0;" + << node->flat_name () << " (TAO_InputCDR &) = 0;" << be_nl; } } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp index 368a53e1e71..6ee52bcc6f9 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp @@ -75,7 +75,7 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) << "}\n\n"; // generate the ifdefined macro for the _var 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, @@ -86,7 +86,7 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *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 (node->gen_out_impl () == -1) { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp index 40b655a80b1..a28d3e2432d 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -112,7 +112,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) } else { - *os << "this->_tao_marshal__" << node->flatname () + *os << "this->_tao_marshal__" << node->flat_name () << " (strm);" << be_uidt_nl; } *os << "}\n" << be_nl; @@ -130,7 +130,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) } else { - *os << "this->_tao_unmarshal__" << node->flatname () + *os << "this->_tao_unmarshal__" << node->flat_name () << " (strm);" << be_uidt_nl; } *os << "}\n" << be_nl; @@ -181,7 +181,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) // The static T::_tao_unmarshal method ------------------------ end // generate the ifdefined macro for the _init type - os->gen_ifdef_macro (node->flatname (), "_init"); + os->gen_ifdef_macro (node->flat_name (), "_init"); if (this->gen_init_impl (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp index 4cdee96d078..c95b5299225 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp @@ -61,7 +61,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) if (node->opt_accessor ()) { os->indent (); - *os << "typedef " << node->fullname () << " "; + *os << "typedef " << node->full_name () << " "; if (!node->is_nested ()) *os << "OBV_"; *os << node->local_name () << ";" << be_nl; @@ -70,7 +70,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) { // == STEP 1: generate the class name and the class name we inherit == - os->gen_ifdef_macro (node->flatname (), "_OBV"); + os->gen_ifdef_macro (node->flat_name (), "_OBV"); os->indent (); *os << "// OBV_ class" << be_nl; @@ -78,7 +78,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) if (!node->is_nested()) // we are in root ? *os << "OBV_"; *os << node->local_name () << " : public virtual " - << node->fullname () << be_nl; + << node->full_name () << be_nl; // == STEP 2: generate the body == @@ -97,9 +97,9 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) { *os << be_uidt_nl << "protected:" << be_idt_nl; *os << "virtual CORBA::Boolean _tao_marshal__" - << node->flatname () << " (TAO_OutputCDR &);" << be_nl; + << node->flat_name () << " (TAO_OutputCDR &);" << be_nl; *os << "virtual CORBA::Boolean _tao_unmarshal__" - << node->flatname () << " (TAO_InputCDR &);" << be_nl; + << node->flat_name () << " (TAO_InputCDR &);" << be_nl; *os << "CORBA::Boolean " << "_tao_marshal_state (TAO_OutputCDR &);" << be_nl << "CORBA::Boolean " diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp index 4bcf4ef00ba..15dc7954f15 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp @@ -62,7 +62,7 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node) os->indent (); *os << "CORBA::Boolean " << be_nl << node->full_obv_skel_name () - << "::_tao_marshal__" << node->flatname () + << "::_tao_marshal__" << node->flat_name () << " (TAO_OutputCDR &strm)" << "{" << be_idt_nl << "return " << node->full_obv_skel_name () @@ -71,7 +71,7 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node) *os << "CORBA::Boolean " << node->full_obv_skel_name () - << "::_tao_unmarshal__" << node->flatname () + << "::_tao_unmarshal__" << node->flat_name () << " (TAO_InputCDR &strm)" << "{" << be_idt_nl << "return " << node->full_obv_skel_name () diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ch.cpp index 5411463a7ec..a8a1c6bc183 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ch.cpp @@ -59,7 +59,7 @@ be_visitor_valuetype_fwd_ch::visit_valuetype_fwd (be_valuetype_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 () @@ -68,7 +68,7 @@ be_visitor_valuetype_fwd_ch::visit_valuetype_fwd (be_valuetype_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) @@ -82,7 +82,7 @@ be_visitor_valuetype_fwd_ch::visit_valuetype_fwd (be_valuetype_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_valuetype_fwd/interface_fwd_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ci.cpp index aaadbbb38f6..e14028a0034 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/interface_fwd_ci.cpp @@ -55,7 +55,7 @@ be_visitor_valuetype_fwd_ci::visit_valuetype_fwd (be_valuetype_fwd *node) { // generate the ifdefined macro for the _var type - os->gen_ifdef_macro (node->flatname (), "_var"); + os->gen_ifdef_macro (node->flat_name (), "_var"); if (node->gen_var_impl () == -1) { @@ -68,7 +68,7 @@ be_visitor_valuetype_fwd_ci::visit_valuetype_fwd (be_valuetype_fwd *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 (node->gen_out_impl () == -1) { diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h index 19edeafc611..4daebfe465b 100644 --- a/TAO/TAO_IDL/be_include/be_codegen.h +++ b/TAO/TAO_IDL/be_include/be_codegen.h @@ -304,8 +304,9 @@ public: TAO_AMI_HANDLER_STUB_CS, // AMI_*_Handler class visitor. - TAO_AMI_HANDLER_SERVANT_OPERATION_CH, // Operation in AMI_*_Handler. - TAO_AMI_HANDLER_STUB_OPERATION_CH, // Operation in POA_AMI_*_Handler. + TAO_AMI_HANDLER_SERVANT_OPERATION_CS, + TAO_AMI_HANDLER_SERVANT_OPERATION_CH, // Operation in POA_AMI_*_Handler. + TAO_AMI_HANDLER_STUB_OPERATION_CH, // Operation in AMI_*_Handler. TAO_AMI_HANDLER_OPERATION_ARGLIST_CH, TAO_AMI_HANDLER_OPERATION_ARGLIST_CS, TAO_ARGUMENT_AMI_HANDLER_ARGLIST_CH, @@ -315,14 +316,6 @@ public: TAO_AMI_HANDLER_TYPECODE_DECL, // Typecode decl for the AMI_*_Handler. - TAO_COLLOCATED_AMI_HANDLER_CH, // Collocated AMI_*_Handler class. - - TAO_COLLOCATED_AMI_HANDLER_OPERATION_CH, // Operation inside the collocated AMI handler. - -// @@ Michael TAO_AMI_HANDLER_ARGUMENT_INVOKE_CS, - -// @@ Michael TAO_AMI_HANDLER_OPERATION_ARG_INVOKE_CS, - TAO_AMI_HANDLER_STUB_OPERATION_CS, TAO_AMI_HANDLER_TYPECODE_DEFN, // Typecode definition for AMI Handler class. @@ -337,8 +330,28 @@ public: TAO_AMI_HANDLER_OPERATION_ARG_DECL_CS, // Argument declartion. + TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CH, + + TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS, + + TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CH, + + TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CS, + + TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CH, + + TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CS, + + TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_CH, + + TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_CS, + TAO_AMI_HANDLER_ARGUMENT_VARDECL_CS, // State derived out of the above + TAO_AMI_HANDLER_OPERATION_COLLOCATED_ARG_UPCALL_CS, // Argument list for the upcall + + TAO_AMI_HANDLER_ARGUMENT_COLLOCATED_UPCALL_CS, // State derived out of the above + TAO_AMI_HANDLER_OPERATION_ARG_UPCALL_CS, // Argument list for the upcall // (only out and inout arguments) TAO_AMI_HANDLER_ARGUMENT_UPCALL_CS, // State derived out of the above diff --git a/TAO/TAO_IDL/be_include/be_decl.h b/TAO/TAO_IDL/be_include/be_decl.h index 8760544110b..86dd37c67f5 100644 --- a/TAO/TAO_IDL/be_include/be_decl.h +++ b/TAO/TAO_IDL/be_include/be_decl.h @@ -63,37 +63,36 @@ public: virtual SIZE_TYPE size_type (void); // return our size type - const char *fullname (void); + const char *full_name (void); // return the stringified full name - const char *ami_handler_fullname (void); - // return the stringified full name of the assosciated AMI reply handler. - - const char *flatname (void); + const char *flat_name (void); // return the flattened full scoped name. - const char *ami_handler_flatname (void); - // return the flattened full scoped name of the assosciated AMI reply handler. + const char *repoID (void); + // retrieve the repository ID. - char* compute_flatname (const char *prefix, const char *suffix); + // Methods used by the interface type strategy + void compute_full_name (const char *prefix, + const char *suffix, + char *&name); // Both the arguments should be non-null!!!. Applies prefix and // suffix to the local name and makes a flat name. - const char *repoID (void); - // retrieve the repository ID. + void compute_flat_name (const char *prefix, + const char *suffix, + char *& name); + // Both the arguments should be non-null!!!. Applies prefix and + // suffix to the local name and makes a flat name. - const char *ami_handler_repoID (void); - // retrieve the repository ID of the assosciated AMI reply handler. - char *compute_repoID (const char *prefix, const char *suffix); + void compute_repoID (const char *prefix, + const char *suffix, + char *& name); // Apply the prefix and suffix to the local name and compute the // repoID. Both the parameters should be non-null. - int compute_ami_handler_name (const char *name, - char *&ami_handler_name); - // Computes the name of the corresponding AMI handler out of a - // given name. The name might contain POA_ at the beginning - // and might possibly have many scope levels. + // End of Methods use by the interface type strategy const char* prefix (void); // retrieve the repository ID prefix @@ -150,13 +149,12 @@ protected: virtual int compute_size_type (void); // determine our size type and set it if it is unknown - virtual void compute_fullname (void); + virtual void compute_full_name (void); // computes the fully scoped name - virtual void compute_flatname (void); + virtual void compute_flat_name (void); // compute the flattened fully scoped name - virtual void compute_repoID (void); // computes the repoID @@ -179,24 +177,15 @@ protected: idl_bool cli_stub_cdr_op_gen_; idl_bool cli_inline_cdr_op_gen_; - char *fullname_; + char *full_name_; // our full scoped name - char *ami_handler_fullname_; - // our full scoped name of the associated AMI reply handler - - char *flatname_; + char *flat_name_; // flattened fully scoped name - char *ami_handler_flatname_; - // flattened fully scoped name of the associated AMI reply handler - char *repoID_; // repository ID - char *ami_handler_repoID_; - // repository ID of the associated AMI reply handler - char *prefix_; // The repository ID prefix diff --git a/TAO/TAO_IDL/be_include/be_helper.h b/TAO/TAO_IDL/be_include/be_helper.h index c931b758f97..cb0a911e2f9 100644 --- a/TAO/TAO_IDL/be_include/be_helper.h +++ b/TAO/TAO_IDL/be_include/be_helper.h @@ -134,7 +134,7 @@ public: int print (const char *format, ...); // "printf" style variable argument print - int gen_ifdef_macro (const char *flatname, const char *suffix=0); + int gen_ifdef_macro (const char *flat_name, const char *suffix=0); // generate a #if !defined, #defined macro int gen_endif (void); diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h index e47fece8262..3b8c8d7c42a 100644 --- a/TAO/TAO_IDL/be_include/be_interface.h +++ b/TAO/TAO_IDL/be_include/be_interface.h @@ -16,7 +16,8 @@ // = AUTHOR // Copyright 1994-1995 by Sun Microsystems, Inc. // and -// Aniruddha Gokhale +// Aniruddha Gokhale, +// Michael Kircher // // ============================================================================ @@ -24,6 +25,217 @@ #define TAO_BE_INTERFACE_H class TAO_OutStream; +class be_interface; + +// This class serves as a strategy base class for the differences +// in generating e.g. ami reply handlers. + +class be_interface_type_strategy +{ +public: + be_interface_type_strategy (be_interface *node) + : local_name_(0), + full_name_(0), + flat_name_(0), + repoID_(0), + full_skel_name_(0), + full_coll_name_(0), + local_coll_name_(0), + relative_skel_name_(0), + node_ (node) + { + }; + + virtual ~be_interface_type_strategy () + { + if (this->local_name_ != 0) + delete [] this->local_name_; + if (this->full_name_ != 0) + delete [] this->full_name_; + if (this->flat_name_ != 0) + delete [] this->flat_name_; + if (this->repoID_ != 0) + delete [] this->repoID_; + if (this->full_skel_name_ != 0) + delete [] this->full_skel_name_; + if (this->full_coll_name_ != 0) + delete [] this->full_coll_name_; + if (this->local_coll_name_ != 0) + delete [] this->local_coll_name_; + if (this->relative_skel_name_ != 0) + delete [] this->relative_skel_name_; + } + virtual const char *local_name (void) = 0; + // return the local name + + virtual const char *full_name (void) = 0; + // return the stringified full name + + virtual const char *flat_name (void) = 0; + // return the flattened full scoped name. + + virtual const char *repoID (void) = 0; + // retrieve the repository ID. + + virtual const char *full_skel_name (void) = 0; + // retrieve the fully scoped skel class name. + + virtual const char *full_coll_name (int) = 0; + // retrieve the fully qualified collocated class name + + virtual const char *local_coll_name (int) = 0; + // retrieve the fully qualified collocated class name. + + const char *relative_skel_name (const char *skel_name); + // relative skeleton name + + const char* relative_name (const char *localname, + const char *othername); + + void compute_names (const char* name, + const char* prefix, + const char* suffix, + char *&new_name); + // compute the names using the local prefix and suffix + + void compute_coll_names (int type, + const char *prefix, + const char *suffix); + // compute the collocation names + + virtual TAO_OutStream *get_out_stream () = 0; + // return the out stream depending on the strategy + // -> the client stub (e.g. AMI) or server skeleton + // outstream is returned. + + virtual const char *get_out_stream_fname () = 0; + // return the file name of the output stream. + +protected: + + char *local_name_; + + char *full_name_; + + char *flat_name_; + + char *repoID_; + + char *full_skel_name_; + + char *full_coll_name_; + + char *local_coll_name_; + + char *relative_skel_name_; + + be_interface *node_; + // The node we strategize +}; + + + +class be_interface_ami_handler_strategy + : public be_interface_type_strategy +{ +public: + // begin overridden methods. + be_interface_ami_handler_strategy (be_interface *node) + : be_interface_type_strategy (node), + prefix_("AMI_"), + suffix_("_Handler") + { + }; + + virtual ~be_interface_ami_handler_strategy () + { + }; + + const char * local_name (void); + // return the local name + + virtual const char *full_name (void); + // return the stringified full name + + virtual const char *flat_name (void); + // return the flattened full scoped name. + + virtual const char *repoID (void); + // retrieve the repository ID. + + virtual const char *full_skel_name (void); + // retrieve the fully scoped skel class name. + + virtual const char *full_coll_name (int); + // retrieve the fully qualified collocated class name + + virtual const char *local_coll_name (int); + // retrieve the fully qualified collocated class name. + + virtual TAO_OutStream *get_out_stream (); + // return the out stream depending on the strategy + // return the client stub + + virtual const char *get_out_stream_fname (); + // return the file name of the output stream. + + // end of overridden methods +private: + + const char *prefix_; + // The prefix to the interface + + const char *suffix_; + // The suffix to the interface +}; + + +class be_interface_default_strategy + : public be_interface_type_strategy +{ +public: + // begin overridden methods. + be_interface_default_strategy (be_interface *node) + : be_interface_type_strategy (node) + { + }; + + virtual ~be_interface_default_strategy () + { + }; + + const char * local_name (void); + // return the local name + + virtual const char *full_name (void); + // return the stringified full name + + virtual const char *flat_name (void); + // return the flattened full scoped name. + + virtual const char *repoID (void); + // retrieve the repository ID. + + virtual const char *full_skel_name (void); + // retrieve the fully scoped skel class name. + + virtual const char *full_coll_name (int); + // retrieve the fully qualified collocated class name + + virtual const char *local_coll_name (int); + // retrieve the fully qualified collocated class name. + + virtual TAO_OutStream *get_out_stream (); + // return the out stream depending on the strategy + // return the server skeleton + + virtual const char *get_out_stream_fname (); + // return the file name of the output stream. + + // end of overridden methods +}; + + /* * BE_Interface @@ -42,7 +254,6 @@ public: THRU_POA = 0, DIRECT = 1 }; - // Collocated stubs type value. // used to pass functions to the template method typedef int (*tao_code_emitter) (be_interface *, be_interface *, TAO_OutStream *); @@ -51,7 +262,9 @@ public: be_interface (void); // Default constructor - be_interface (UTL_ScopedName *n, AST_Interface **ih, long nih, + be_interface (UTL_ScopedName *n, + AST_Interface **ih, + long nih, UTL_StrList *p); // Constructor that sets its scoped name <n>, a list of inherited interfaces // <ih>, the number of inherited interfaces <nih>, and any prgmas <p> @@ -59,6 +272,40 @@ public: ~be_interface (void); // dtor + be_interface_type_strategy *set_strategy (be_interface_type_strategy *new_strategy); + // Set the strategy to generate the names + + // Methods, which access the strategy + + const char *local_name (void) const; + // return the local name + + const char *full_name (void) const; + // return the stringified full name + + const char *flat_name (void) const; + // return the flattened full scoped name. + + const char *repoID (void) const; + // retrieve the repository ID. + + const char *full_skel_name (void) const; + // retrieve the fully scoped skel class name. + + const char *full_coll_name (int) const; + // retrieve the fully qualified collocated class name + + const char *local_coll_name (int) const; + // retrieve the fully qualified collocated class name. + + const char *be_interface::relative_skel_name (const char *skel_name); + // relative skeleton name + + void compute_full_skel_name (const char *prefix,char *&skel_name); + // Build up the skeleton name + + static const char *relative_name (const char *localname, const char *othername); + virtual void gen_def_ctors (TAO_OutStream* os); //call the default constructors of all the base classes @@ -86,13 +333,6 @@ public: // Generate the out class implementation. // If any one of the argument is 0, then use the name giin this // node, else use the arguments. - - const char *full_skel_name (void); - // Retrieve the fully scoped skel class name. - - const char *ami_handler_full_skel_name (void); - // Retrieve the fully scoped skel AMI handler class name - // // Each interface (to fix names "T") also defines two help classes, // the "collocated" class inherits from T, but delegates on the @@ -104,35 +344,11 @@ public: // defines the stubs (all operations in T are pure virtual). // @@ TODO currently the stub class is not implemented. // - const char *full_coll_name (int); - // Retrieve the fully qualified collocated class name - - const char *ami_handler_full_coll_name (void); - // Retrieve the fully qualified collocated AMI handler class name - - const char *local_coll_name (int) const; - // Retrieve the fully qualified collocated class name. - - const char *ami_handler_local_coll_name (void); - // Retrieve the fully qualified collocated AMI handler class name. - - const char *ami_handler_local_name (void); - // Retrieve the local name of the AMI handler - - int compute_coll_names (const char *local_name, - char *&coll_local_name, - char *&coll_full_name); - // Generate collocated local and full names for the arbitrary local - // name under the scope of this interface. Usefull to generate AMI - // Handlers. virtual int traverse_inheritance_graph (tao_code_emitter gen, TAO_OutStream *os); // template method using breadth first traversal of inheritance graph - const char *relative_skel_name (const char *other_class_name); - // relative skeleton name - int in_mult_inheritance (void); // am I in some form of multiple inheritance // -1 => error @@ -166,6 +382,12 @@ public: // helper method passed to the template method to generate code for the // operation table + static int ami_handler_gen_optable_helper (be_interface *, + be_interface *, + TAO_OutStream *os); + // helper method passed to the template method to generate code for the + // operation table + static int gen_skel_helper (be_interface *, be_interface *, TAO_OutStream *os); @@ -197,23 +419,12 @@ public: //helper method to generate a call to the copy constructors of all the base classes - void compute_fullskelname (void); - void compute_fullskelname (char *&skelname, const char * prefix); - // compute the fully scoped skel class name - int gen_operation_table (void); // generate the operation table including entries for inherited interfaces - static const char *relative_name (const char* our_name, - const char *other_class_name); - // relative name for collocated class. - int gen_optable_entries (be_interface *); // generate the operation table entries. - void compute_coll_name (int); - // compute the fully qualified collocated class name. - private: void gen_gperf_input_header (TAO_OutStream *ss); // Output the header (type declaration and %%) to the gperf's input @@ -249,33 +460,15 @@ private: void gen_linear_search_instance (void); // Create an instance of the linear search optable. - char *full_skel_name_; - // Fully scoped skeleton name. - - char *ami_handler_full_skel_name_; - // Fully scoped AMI Handler skeleton name - int skel_count_; // Number of static skeletons in the operation table. - char *full_coll_name_; - // Full collocated name - - char *ami_handler_full_coll_name_; - // Full collocated name of the AMI handler - - char *local_coll_name_; - // Local collocated name - - char *ami_handler_local_coll_name_; - // Local collocated name of the AMI handler - - char *ami_handler_local_name_; - // Local name of the AMI Handler - int in_mult_inheritance_; // am I directly or indirectly involved in a multiple inheritance. If the // value is -1 => not computed yet. + + be_interface_type_strategy *strategy_; + // Member for holding the strategy for generating names }; #endif // if !defined diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface.h index e35aed8ac7b..8f2e85f15fb 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface.h @@ -45,10 +45,13 @@ #include "be_visitor_interface/tie_si.h" #include "be_visitor_interface/ami_handler_fwd_ch.h" #include "be_visitor_interface/ami_handler_fwd_ci.h" -#include "be_visitor_interface/ami_handler_servant_ch.h" -#include "be_visitor_interface/ami_handler_servant_cs.h" #include "be_visitor_interface/ami_handler_stub_ch.h" #include "be_visitor_interface/ami_handler_stub_cs.h" + +#if 0 /* We are using normal servant code */ #include "be_visitor_interface/collocated_ami_handler_ch.h" +#include "be_visitor_interface/ami_handler_servant_ch.h" +#include "be_visitor_interface/ami_handler_servant_cs.h" +#endif /* 0 */ #endif /* _BE_VISITOR_INTERFACE_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation.h index e19952ca92d..dd637624a35 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation.h @@ -61,6 +61,10 @@ #include "be_visitor_operation/ami_handler_operation_ch.h" #include "be_visitor_operation/ami_handler_arglist.h" #include "be_visitor_operation/ami_handler_operation_cs.h" +#include "be_visitor_operation/ami_handler_servant_operation_cs.h" #include "be_visitor_operation/ami_handler_skeleton_cs.h" #include "be_visitor_operation/ami_handler_argument_marshal.h" +#include "be_visitor_operation/ami_handler_thru_poa_collocated_ch.h" +#include "be_visitor_operation/ami_handler_thru_poa_collocated_cs.h" + #endif // TAO_BE_VISITOR_OPERATION_H diff --git a/TAO/tao/PollableC.cpp b/TAO/tao/PollableC.cpp index 0a27a5f3bd2..3dc24e91601 100644 --- a/TAO/tao/PollableC.cpp +++ b/TAO/tao/PollableC.cpp @@ -34,7 +34,7 @@ ACE_RCSID(tao, PollableC, "$Id$") CORBA_Pollable_ptr CORBA_Pollable::_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &env + CORBA::Environment &ACE_TRY_ENV ) { if (CORBA::is_nil (obj)) @@ -196,7 +196,7 @@ const char* CORBA_Pollable::_interface_repository_id (void) const CORBA::DIIPollable_ptr CORBA::DIIPollable::_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &env + CORBA::Environment &ACE_TRY_ENV ) { if (CORBA::is_nil (obj)) @@ -256,7 +256,7 @@ const char* CORBA::DIIPollable::_interface_repository_id (void) const CORBA_PollableSet_ptr CORBA_PollableSet::_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &env + CORBA::Environment &ACE_TRY_ENV ) { if (CORBA::is_nil (obj)) |