diff options
Diffstat (limited to 'TAO')
149 files changed, 603 insertions, 786 deletions
@@ -1,6 +1,9 @@ USER VISIBLE CHANGES BETWEEN TAO-3.0.4 and TAO-3.0.5 ==================================================== +. TAO_IDL: Fix bug where floating point constant expressions fail to evaluate. + This bug was introduced in 3.0.3. + USER VISIBLE CHANGES BETWEEN TAO-3.0.3 and TAO-3.0.4 ==================================================== diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp index 276f0f66cac..7249d745843 100644 --- a/TAO/TAO_IDL/ast/ast_expression.cpp +++ b/TAO/TAO_IDL/ast/ast_expression.cpp @@ -98,6 +98,7 @@ AST_Expression::eval_kind_to_expr_type (AST_Expression::EvalKind eval_kind) case EK_long: return EV_long; case EK_ulong: + case EK_positive_int: return EV_ulong; case EK_longlong: return EV_longlong; @@ -113,9 +114,13 @@ AST_Expression::eval_kind_to_expr_type (AST_Expression::EvalKind eval_kind) return EV_int8; case EK_uint8: return EV_uint8; - default: + case EK_const: + idl_global->err ()->misc_error ("eval_kind_to_expr_type can't handle EK_const"); return EV_none; } + + idl_global->err ()->misc_error ("eval_kind_to_expr_type unhandled EvalKind"); + return EV_none; } // Helper function to fill out the details of where this expression @@ -1650,7 +1655,8 @@ eval_kind (AST_Expression::AST_ExprValue *ev, AST_Expression::EvalKind ek) case AST_Expression::EK_uint8: retval = coerce_value (newval, AST_Expression::EV_uint8); break; - default: + case AST_Expression::EK_floating_point: + retval = coerce_value (newval, AST_Expression::EV_double); break; } @@ -1736,7 +1742,8 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) return nullptr; } - ExprType const expr_type = eval_kind_to_expr_type (ek); + ExprType const expr_type = ek == EK_const ? + pd_v1->ev ()->et : eval_kind_to_expr_type (ek); if (expr_type == EV_none) return nullptr; ACE_NEW_RETURN (retval, @@ -1806,7 +1813,7 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) break; default: - success = true; + break; } if (!success) @@ -1818,6 +1825,17 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) return retval; } +template <typename Type> +bool +do_eval_mod_op (Type a, Type b, Type &result) +{ + if (b == 0) { + return false; + } + result = a % b; + return true; +} + // Apply binary operators to an AST_Expression after evaluating // its sub-expressions. // Operations supported: '%' @@ -1839,79 +1857,74 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) return nullptr; } + ExprType const expr_type = ek == EK_const ? + pd_v1->ev ()->et : eval_kind_to_expr_type (ek); + if (expr_type == EV_none) return nullptr; + ACE_NEW_RETURN (retval, AST_ExprValue, nullptr); - if (ek == EK_ulonglong) + pd_v1->set_ev (pd_v1->coerce (expr_type)); + pd_v2->set_ev (pd_v2->coerce (expr_type)); + retval->et = expr_type; + + bool success = false; + switch (expr_type) { - this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulonglong)); - this->pd_v2->set_ev (this->pd_v2->coerce (EV_ulonglong)); - retval->et = EV_ulonglong; + case EV_int8: + success = do_eval_mod_op<ACE_CDR::Int8> ( + pd_v1->ev ()->u.int8val, pd_v2->ev ()->u.int8val, retval->u.int8val); + break; - if (this->pd_v2->ev ()->u.ullval == 0) - { - delete retval; - retval = nullptr; - return nullptr; - } + case EV_uint8: + success = do_eval_mod_op<ACE_CDR::UInt8> ( + pd_v1->ev ()->u.uint8val, pd_v2->ev ()->u.uint8val, retval->u.uint8val); + break; - retval->u.ullval = - this->pd_v1->ev ()->u.ullval % this->pd_v2->ev ()->u.ullval; - } - else if (ek == EK_longlong) - { - this->pd_v1->set_ev (this->pd_v1->coerce (EV_longlong)); - this->pd_v2->set_ev (this->pd_v2->coerce (EV_longlong)); - retval->et = EV_longlong; + case EV_short: + success = do_eval_mod_op<ACE_CDR::Short> ( + pd_v1->ev ()->u.sval, pd_v2->ev ()->u.sval, retval->u.sval); + break; - if (this->pd_v2->ev ()->u.llval == 0) - { - delete retval; - retval = nullptr; - return nullptr; - } + case EV_ushort: + success = do_eval_mod_op<ACE_CDR::UShort> ( + pd_v1->ev ()->u.usval, pd_v2->ev ()->u.usval, retval->u.usval); + break; - retval->u.llval = - this->pd_v1->ev ()->u.llval % this->pd_v2->ev ()->u.llval; - } - else if (ek == EK_ulong) - { - this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulong)); - this->pd_v2->set_ev (this->pd_v2->coerce (EV_ulong)); - retval->et = EV_ulong; + case EV_long: + success = do_eval_mod_op<ACE_CDR::Long> ( + pd_v1->ev ()->u.lval, pd_v2->ev ()->u.lval, retval->u.lval); + break; - if (this->pd_v2->ev ()->u.ulval == 0) - { - delete retval; - retval = nullptr; - return nullptr; - } + case EV_ulong: + success = do_eval_mod_op<ACE_CDR::ULong> ( + pd_v1->ev ()->u.ulval, pd_v2->ev ()->u.ulval, retval->u.ulval); + break; - retval->u.ulval = - this->pd_v1->ev ()->u.ulval % this->pd_v2->ev ()->u.ulval; - } - else if (ek == EK_long) - { - this->pd_v1->set_ev (this->pd_v1->coerce (EV_long)); - this->pd_v2->set_ev (this->pd_v2->coerce (EV_long)); - retval->et = EV_long; + case EV_longlong: + success = do_eval_mod_op<ACE_CDR::LongLong> ( + pd_v1->ev ()->u.llval, pd_v2->ev ()->u.llval, retval->u.llval); + break; - if (this->pd_v2->ev ()->u.lval == 0) - { - delete retval; - retval = nullptr; - return nullptr; - } + case EV_ulonglong: + success = do_eval_mod_op<ACE_CDR::ULongLong> ( + pd_v1->ev ()->u.ullval, pd_v2->ev ()->u.ullval, retval->u.ullval); + break; + + case EV_octet: + success = do_eval_mod_op<ACE_CDR::Octet> ( + pd_v1->ev ()->u.oval, pd_v2->ev ()->u.oval, retval->u.oval); + break; - retval->u.lval = - this->pd_v1->ev ()->u.lval % this->pd_v2->ev ()->u.lval; + default: + break; } - else + + if (!success) { delete retval; retval = nullptr; - return nullptr; } return retval; @@ -1991,9 +2004,9 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) pd_v2->set_ev (pd_v2->coerce (expr_type)); retval->et = expr_type; - bool success = true; + bool success = false; switch (expr_type) - { + { case EV_int8: success = do_eval_bit_op<ACE_CDR::Int8> (pd_ec, pd_v1->ev ()->u.int8val, pd_v2->ev ()->u.int8val, retval->u.int8val); @@ -2045,8 +2058,8 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) break; default: - success = true; - } + break; + } if (!success) { @@ -2163,10 +2176,10 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) case EV_octet: retval->u.oval = ~this->pd_v1->ev ()->u.oval; break; - case AST_Expression::EV_int8: + case EV_int8: retval->u.int8val = ~pd_v1->ev ()->u.int8val; break; - case AST_Expression::EV_uint8: + case EV_uint8: retval->u.uint8val = ~pd_v1->ev ()->u.uint8val; break; default: @@ -2372,8 +2385,21 @@ AST_Expression::coerce (AST_Expression::ExprType t) case EV_fixed: tmp = this->eval_internal (EK_fixed_point); break; - default: - tmp = this->eval_internal (EK_const); + case EV_float: + case EV_double: + case EV_longdouble: + tmp = eval_internal (EK_floating_point); + break; + case EV_char: + case EV_wchar: + case EV_string: + case EV_wstring: + case EV_enum: + case EV_any: + case EV_object: + case EV_void: + tmp = eval_internal (EK_const); + case EV_none: break; } @@ -2457,7 +2483,8 @@ AST_Expression::coerce (AST_Expression::ExprType t) case EV_uint8: copy->u.uint8val = this->pd_ev->u.uint8val; break; - default: + case EV_any: + case EV_object: break; } @@ -2677,29 +2704,33 @@ dump_expr_val (ACE_OSTREAM_TYPE &o, AST_Expression::AST_ExprValue *ev) { case AST_Expression::EV_short: o << ev->u.sval; - break; + return; case AST_Expression::EV_ushort: o << ev->u.usval; - break; + return; case AST_Expression::EV_long: o << ev->u.lval; - break; + return; case AST_Expression::EV_ulong: case AST_Expression::EV_enum: o << ev->u.ulval; - break; + return; case AST_Expression::EV_float: o << ev->u.fval; - break; + return; case AST_Expression::EV_double: o << ev->u.dval; - break; + return; case AST_Expression::EV_char: o << ev->u.cval; - break; + return; case AST_Expression::EV_wchar: - o << ev->u.wcval; +#ifdef ACE_HAS_CPP20 break; +#else + o << ev->u.wcval; + return; +#endif case AST_Expression::EV_octet: { std::ios saved (nullptr); @@ -2707,10 +2738,10 @@ dump_expr_val (ACE_OSTREAM_TYPE &o, AST_Expression::AST_ExprValue *ev) o << "0x" << std::hex << std::setw (2) << std::setfill ('0') << unsigned (ev->u.oval); o.copyfmt (saved); } - break; + return; case AST_Expression::EV_bool: o << (ev->u.bval == true ? "TRUE" : "FALSE"); - break; + return; case AST_Expression::EV_string: if (ev->u.strval != nullptr) { @@ -2720,25 +2751,32 @@ dump_expr_val (ACE_OSTREAM_TYPE &o, AST_Expression::AST_ExprValue *ev) { o << "(null string)"; } - break; + return; case AST_Expression::EV_longlong: o << ev->u.llval; - break; + return; case AST_Expression::EV_ulonglong: o << ev->u.ullval; - break; + return; case AST_Expression::EV_fixed: o << ev->u.fixedval; - break; + return; case AST_Expression::EV_int8: o << static_cast<short> (ev->u.int8val); - break; + return; case AST_Expression::EV_uint8: o << static_cast<unsigned short> (ev->u.uint8val); + return; + case AST_Expression::EV_longdouble: + case AST_Expression::EV_wstring: + case AST_Expression::EV_any: + case AST_Expression::EV_object: + case AST_Expression::EV_void: + case AST_Expression::EV_none: break; - default: - o << "(Can not dump this type)"; } + + o << "(Can not dump type " << AST_Expression::exprtype_to_string (ev->et) << ")"; } // Dump an AST_Expression node to the ostream o. @@ -2840,6 +2878,7 @@ AST_Expression::dump (ACE_OSTREAM_TYPE &o) o << ACE_TEXT ("(nil symbolic name)"); break; case EC_none: + o << ACE_TEXT ("(none)"); break; default: o << ACE_TEXT ("unsupported dump mode for expression with ec == ") @@ -3046,9 +3085,9 @@ AST_Expression::exprtype_to_string (ExprType t) return "uint8"; case AST_Expression::EV_int8: return "int8"; - default: - return "<UNKNOWN TYPE>"; } + + return "<UNKNOWN TYPE>"; } AST_Enum * diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index b94578fc1a9..c886e5b6135 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -145,9 +145,7 @@ TAO_CodeGen::start_client_header (const char *fname) return -1; } - *this->client_header_ << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->client_header_); // Generate the #ident string, if any. this->gen_ident_string (this->client_header_); @@ -362,9 +360,7 @@ TAO_CodeGen::start_client_stubs (const char *fname) return -1; } - *this->client_stubs_ << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->client_stubs_); this->gen_stub_src_includes (); @@ -446,10 +442,7 @@ TAO_CodeGen::start_server_header (const char *fname) return -1; } - *this->server_header_ << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_header_); // Generate the ident string, if any. this->gen_ident_string (this->server_header_); @@ -575,12 +568,7 @@ TAO_CodeGen::start_server_template_header (const char *fname) return -1; } - *this->server_template_header_ << be_nl - << "// TAO_IDL - Generated from" - << be_nl - << "// " << __FILE__ - << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_template_header_); // Generate the ident string, if any. this->gen_ident_string (this->server_template_header_); @@ -631,9 +619,7 @@ TAO_CodeGen::start_server_skeletons (const char *fname) return -1; } - *this->server_skeletons_ << be_nl_2 << "// TAO_IDL - Generated from" - << be_nl << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_skeletons_); // Generate the ident string, if any. this->gen_ident_string (this->server_skeletons_); @@ -693,10 +679,7 @@ TAO_CodeGen::start_server_template_skeletons (const char *fname) return -1; } - *this->server_template_skeletons_ << be_nl << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_template_skeletons_); // Generate the ident string, if any. this->gen_ident_string (this->server_template_skeletons_); @@ -772,10 +755,7 @@ TAO_CodeGen::start_anyop_header (const char *fname) return 0; } - *this->anyop_header_ << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->anyop_header_); // Generate the #ident string, if any. this->gen_ident_string (this->anyop_header_); @@ -1007,10 +987,7 @@ TAO_CodeGen::start_ciao_svnt_header (const char *fname) TAO_OutStream &os = *this->ciao_svnt_header_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_header_); @@ -1110,10 +1087,7 @@ TAO_CodeGen::start_ciao_svnt_source (const char *fname) TAO_OutStream &os = *this->ciao_svnt_source_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_source_); @@ -1153,10 +1127,7 @@ TAO_CodeGen::start_ciao_svnt_template_header (const char *fname) TAO_OutStream &os = *this->ciao_svnt_template_header_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_template_header_); @@ -1235,10 +1206,7 @@ TAO_CodeGen::start_ciao_svnt_template_source (const char *fname) TAO_OutStream &os = *this->ciao_svnt_template_source_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_template_source_); @@ -1442,10 +1410,7 @@ TAO_CodeGen::start_ciao_conn_header (const char *fname) TAO_OutStream &os = *this->ciao_conn_header_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_conn_header_); @@ -1514,10 +1479,7 @@ TAO_CodeGen::start_ciao_conn_source (const char *fname) TAO_OutStream &os = *this->ciao_conn_source_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_conn_source_); @@ -1593,10 +1555,7 @@ TAO_CodeGen::start_implementation_header (const char *fname) return -1; } - *this->implementation_header_ << be_nl << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->implementation_header_); // Generate the ident string, if any. this->gen_ident_string (this->implementation_header_); @@ -1650,10 +1609,7 @@ TAO_CodeGen::start_implementation_skeleton (const char *fname) return -1; } - *this->implementation_skeleton_ << be_nl << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->implementation_skeleton_); // Generate the ident string, if any. this->gen_ident_string (this->implementation_skeleton_); @@ -1680,9 +1636,7 @@ TAO_CodeGen::end_client_header () { // Generate the <<= and >>= operators here. - *this->client_header_ << be_nl_2 << "// TAO_IDL - Generated from" - << be_nl << "// " << __FILE__ << ":" - << __LINE__ << be_nl; + TAO_INSERT_COMMENT (this->client_header_); // End versioned namespace support before remaining include // directives at end of file. @@ -1824,9 +1778,7 @@ TAO_CodeGen::end_implementation_header (const char *fname) int TAO_CodeGen::end_server_template_header () { - *this->server_template_header_ << be_nl_2 << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ << "\n"; + TAO_INSERT_COMMENT (this->server_template_header_); // End versioned namespace support. Do not place include directives // before this. diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 274da06bb2e..1bf90f25d7e 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -644,3 +644,9 @@ TAO_OutStream::print (AST_Expression *expr) return *this; } +void TAO_OutStream::insert_comment (const char *file, int line) +{ + *this << be_nl << "// TAO_IDL - Generated from" << be_nl + << "// " << file << ':' << static_cast<ACE_CDR::ULong> (line) + << be_nl_2; +} diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index af681500bcf..7ea339d0be1 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -744,8 +744,7 @@ be_interface::gen_var_out_seq_decls () const char *lname = this->local_name (); TAO_OutStream *os = tao_cg->client_header (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the ifdefined macro for this interface. os->gen_ifdef_macro (this->flat_name (), @@ -1856,8 +1855,7 @@ be_interface::gen_gperf_things (const char *flat_name) TAO_OutStream *os = tao_cg->server_skeletons (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the correct class definition for the operation lookup // strategy. Then, get the lookup method from GPERF. And then, diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp index 6308a89c696..04e8801b112 100644 --- a/TAO/TAO_IDL/be/be_type.cpp +++ b/TAO/TAO_IDL/be/be_type.cpp @@ -254,8 +254,7 @@ be_type::gen_common_varout (TAO_OutStream *os) return; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); AST_Type::SIZE_TYPE st = this->size_type (); @@ -294,9 +293,7 @@ be_type::gen_stub_decls (TAO_OutStream *os) return; } - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); AST_Interface *i = dynamic_cast<AST_Interface*> (this); AST_ValueType *v = dynamic_cast<AST_ValueType*> (this); diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp index c5955d0024f..394d8af269e 100644 --- a/TAO/TAO_IDL/be/be_valuetype.cpp +++ b/TAO/TAO_IDL/be/be_valuetype.cpp @@ -451,9 +451,7 @@ be_valuetype::gen_helper_header (char *, char *) { TAO_OutStream *os = tao_cg->client_header (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; @@ -482,8 +480,7 @@ be_valuetype::gen_helper_inline (char *, char *) // is not getting generated... Actually this is a much bigger // problem. Just hacking it up for the timebeing.. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "#if defined (__ACE_INLINE__)" << be_nl_2 << be_global->core_versioning_begin () << be_nl @@ -508,8 +505,7 @@ be_valuetype::gen_helper_stubs (char *, char *) { TAO_OutStream *os = tao_cg->client_stubs (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << "CORBA::add_ref (" << this->full_name () << " * vt)" << be_nl @@ -560,8 +556,7 @@ be_valuetype::gen_var_out_seq_decls () TAO_OutStream *os = tao_cg->client_header (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the ifdefined macro for this interface. os->gen_ifdef_macro (this->flat_name (), diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp index e064a19a8f7..86a28c1b5c6 100644 --- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp @@ -61,9 +61,7 @@ be_visitor_arg_traits::visit_root (be_root *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl << be_global->core_versioning_begin (); @@ -141,8 +139,7 @@ be_visitor_arg_traits::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -244,9 +241,7 @@ be_visitor_arg_traits::visit_valuebox (be_valuebox *node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os); os << be_nl_2 << "template<>" << be_nl @@ -300,9 +295,7 @@ be_visitor_arg_traits::visit_valuetype (be_valuetype *node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -424,8 +417,7 @@ be_visitor_arg_traits::visit_operation (be_operation *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -504,8 +496,7 @@ be_visitor_arg_traits::visit_attribute (be_attribute *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -584,8 +575,7 @@ be_visitor_arg_traits::visit_argument (be_argument *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -678,8 +668,7 @@ be_visitor_arg_traits::visit_sequence (be_sequence *node) return 0; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); bool use_vec = (node->unbounded () && be_global->alt_mapping ()); UTL_ScopedName *sn = alias->name (); @@ -897,8 +886,7 @@ be_visitor_arg_traits::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "template<>" << be_nl @@ -940,8 +928,7 @@ be_visitor_arg_traits::visit_structure (be_structure *node) // multiple declarations. TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "template<>" << be_nl @@ -1051,8 +1038,7 @@ be_visitor_arg_traits::visit_union (be_union *node) // multiple declarations. TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "template<>" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp index c705cd2d96f..7bbb9fc1cb0 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp @@ -29,8 +29,7 @@ be_visitor_array_any_op_ch::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp index 6d545808640..26da3f979fe 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp @@ -28,9 +28,7 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp index 396d0aba553..e2ff06ad28b 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp @@ -44,8 +44,7 @@ int be_visitor_array_ch::visit_array (be_array *node) AST_Decl::NodeType nt = bt->node_type (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we contain an anonymous sequence, // generate code for the sequence here. diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp index 28783028257..d1d176de341 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp @@ -139,8 +139,7 @@ int be_visitor_array_ci::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the array traits specialization definitions, // guarded by #ifdef on unaliased array element type and length. diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp index 86b8b8b371d..414abf50bbb 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp @@ -86,8 +86,7 @@ int be_visitor_array_cs::visit_array (be_array *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // dup method. *os << fname << "_slice *" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp index b65ee3bf8c8..08b67645d47 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp @@ -95,8 +95,7 @@ be_visitor_array_cdr_op_ch::visit_array (be_array *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp index aabe94ec294..95e43e16398 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp @@ -159,8 +159,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp index c8cd22615a1..b8a19f5ce7b 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp @@ -219,9 +219,7 @@ be_visitor_facet_ami_exh::init (bool for_impl) int be_visitor_facet_ami_exh::gen_reply_handler_class () { - os_ << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - + TAO_INSERT_COMMENT (&os_); const char *suffix = "_reply_handler"; this->init (false); @@ -271,8 +269,7 @@ be_visitor_facet_ami_exh::gen_reply_handler_class () int be_visitor_facet_ami_exh::gen_facet_executor_class () { - os_ << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); const char *suffix = "_exec_i"; const char *scope_name = diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp index 89701c0a0de..d8d3d370aa2 100644 --- a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp @@ -31,8 +31,7 @@ be_visitor_constant_ch::visit_constant (be_constant *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we are defined in the outermost scope, then the value is assigned // to us here itself, else it will be in the *.cpp file. diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp index cefc77ce40c..3be50d11c83 100644 --- a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp @@ -50,8 +50,7 @@ be_visitor_constant_cs::visit_constant (be_constant *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; *os << "const "; diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp index af37f51e7c2..c504a5758dc 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp @@ -28,8 +28,7 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index f6d8c7f5b35..4878bc7625e 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -31,8 +31,7 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp index 5c0e63d33ac..1c4dbbf1492 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp @@ -30,8 +30,7 @@ be_visitor_enum_cdr_op_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp index f9a8a698c85..2b4804fa900 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp @@ -26,8 +26,7 @@ be_visitor_enum_cdr_op_cs::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp index 6340ce0039b..7708d5e3d5a 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp @@ -36,8 +36,7 @@ be_visitor_enum_ch::visit_enum (be_enum *node) // Comma to be generated by the scope visitor. this->ctx_->comma (true); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "enum " << node->local_name () << be_nl; *os << "{" << be_idt_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp index 8d19cc74442..3ddec37b246 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp @@ -33,8 +33,7 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; if (node->is_nested ()) diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index c38649bd11a..cc56af49805 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -33,9 +33,7 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp index d190c985d5e..fe0ac4e38e0 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp @@ -33,8 +33,7 @@ be_visitor_exception_cdr_op_ch::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp index eb400f07815..3cb9545dc75 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp @@ -44,8 +44,7 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp index ad0751a4dad..291e946b486 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp @@ -37,8 +37,7 @@ int be_visitor_exception_ch::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "class " << be_global->stub_export_macro () << " " << node->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp index a25dc7fb3da..88b75770072 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp @@ -94,8 +94,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) *os << be_uidt_nl << "}" << be_nl_2; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Default constructor. *os << node->name () << "::" << node->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp index b4730800ba1..1d6042b98eb 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp @@ -47,8 +47,7 @@ be_visitor_exception_ctor::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp index 46691909cae..64ae55b1dd0 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp @@ -346,8 +346,7 @@ be_visitor_field_ch::visit_sequence (be_sequence *node) // Generate the anonymous sequence member typedef. be_decl *bs = this->ctx_->scope ()->decl (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "typedef " << bt->nested_type_name (bs) << " _" << this->ctx_->node ()->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp index 19f7bc40b52..bbbc1de88c0 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp @@ -46,8 +46,7 @@ be_visitor_amh_rh_interface_sh::visit_interface (be_interface *node) rh_skel_class_name = "POA_TAO_"; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); rh_skel_class_name += rh_base_class_name.c_str (); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp index 40e5dc8b263..7624f41f3dc 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp @@ -64,8 +64,7 @@ be_visitor_amh_rh_interface_ss::visit_interface (be_interface *node) ACE_CString rh_skel_class_name (rh_skel_class_name_prefix); rh_skel_class_name += node->local_name (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate code for elements in the scope (e.g., operations) // We'll rely on the base class (be_visitor_scope) to do the diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp index 3f784b98564..92808317280 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp @@ -42,8 +42,7 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); ACE_CString class_name; - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // We shall have a POA_ prefix only if we are at the topmost level. if (!node->is_nested ()) diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp index e792b18f3c4..eab1ed7d3c8 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp @@ -61,8 +61,7 @@ be_visitor_amh_interface_ss::this_method (be_interface *node) this->generate_full_skel_name (node); const char *full_skel_name = full_skel_name_holder.c_str (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << non_amh_name.c_str () << "*" << be_nl << full_skel_name @@ -112,8 +111,7 @@ be_visitor_amh_interface_ss::dispatch_method (be_interface *node) this->generate_full_skel_name (node); const char *full_skel_name = full_skel_name_holder.c_str (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << full_skel_name << "::_dispatch (" << be_idt << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp index ceee283915f..3b53dd70744 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp @@ -27,9 +27,7 @@ be_visitor_ami4ccm_conn_ex_idl::visit_interface (be_interface *node) { Identifier *oln = node->original_local_name (); - os_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); os_ << be_nl_2 << "module CCM_AMI::Connector_T<" << oln << ", AMI4CCM_" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp index 4947b6291e4..76524dba839 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp @@ -26,9 +26,7 @@ be_visitor_ami4ccm_rh_ex_idl::~be_visitor_ami4ccm_rh_ex_idl () int be_visitor_ami4ccm_rh_ex_idl::visit_interface (be_interface *node) { - os_ << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); os_ << be_nl_2 << "local interface AMI4CCM_" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp index c0bab2857f8..bdac09e87f4 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp @@ -28,9 +28,7 @@ be_visitor_ami4ccm_sendc_ex_idl::visit_interface (be_interface *node) { this->iface_ = node; - os_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); os_ << be_nl_2 << "local interface AMI4CCM_" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp index b95446f3f0d..015fd220dd6 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp @@ -37,8 +37,7 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp index b65572712f8..b8bc1dc9b07 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp @@ -34,8 +34,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // All template specializations must be generated before the instantiations // in the operators. diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp index 2453440ca1f..a8e5b555ff7 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp @@ -37,8 +37,7 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp index a9ac02c8953..0e4dd126a29 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp @@ -47,8 +47,7 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) "codegen for scope failed\n"), -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp index ea9855ced65..d1235e9f0fa 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp @@ -20,9 +20,7 @@ be_visitor_interface_direct_proxy_impl_sh::visit_interface ( { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "///////////////////////////////////////////////////////////////////////" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index 888f12fd2fb..720356509f2 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -36,8 +36,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); AST_Component *c = dynamic_cast<AST_Component*> (node); @@ -133,8 +132,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp index 5129d1965d2..10db08a89e3 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp @@ -55,8 +55,7 @@ be_visitor_interface_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->is_abstract ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index 597b9ef62a8..4104945ae59 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -44,8 +44,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) if (node->is_defined () && be_global->gen_arg_traits ()) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin (); 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 448c1ebf838..5ec81099376 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp @@ -42,8 +42,7 @@ be_visitor_interface_ih::visit_interface (be_interface *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } // Now generate the class definition. 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 0d7589dbbd4..d786778da98 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp @@ -35,8 +35,7 @@ be_visitor_interface_is::visit_interface (be_interface *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } *os << "// Implementation skeleton constructor" << be_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 2f7ba2b769b..9e9dcc95034 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -69,8 +69,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the skeleton class name. *os << be_nl_2 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 1594aa5db45..33c5ee3bdab 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -86,8 +86,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; @@ -153,8 +152,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; @@ -353,8 +351,7 @@ be_visitor_interface_ss::this_method (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; @@ -403,8 +400,7 @@ be_visitor_interface_ss::dispatch_method (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp index d403ce016d2..157a6386b21 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp @@ -35,8 +35,7 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "class " << be_global->stub_export_macro ()<< " " << "TAO_" << node->flat_name () 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 bc9e3aaaac4..c45aa7f2909 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp @@ -67,8 +67,7 @@ be_visitor_interface_tie_sh::visit_interface (be_interface *node) } // Now generate the class definition. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// TIE class: Refer to CORBA v2.2, Section 20.34.4" << be_nl; *os << "template <class T>" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp index 7f7569743ef..1e9b2ff8f13 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp @@ -75,8 +75,7 @@ be_visitor_interface_tie_ss::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "template <class T>" << be_nl << fulltiename << "<T>::" << localtiename << " (T &t)" << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp index 7136b8cce2e..57bff448b2a 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp @@ -45,8 +45,7 @@ be_visitor_interface_fwd_any_op_ch::visit_interface_fwd ( TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp index 1af551c91c2..354c2ff8623 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp @@ -43,8 +43,7 @@ be_visitor_interface_fwd_cdr_op_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp b/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp index 9f27e58ac96..681fb1f8cdb 100644 --- a/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp @@ -31,8 +31,7 @@ be_visitor_module_ch::visit_module (be_module *node) TAO_OutStream *os = this->ctx_->stream (); TAO_OutStream *aos = nullptr; - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "namespace " << node->local_name () << be_nl << "{" << be_idt; @@ -41,8 +40,7 @@ be_visitor_module_ch::visit_module (be_module *node) { aos = tao_cg->anyop_header (); - *aos << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (aos); *aos << "namespace " << node->local_name () << be_nl << "{" << be_idt; @@ -60,16 +58,16 @@ be_visitor_module_ch::visit_module (be_module *node) -1); } - *os << be_uidt_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + *os << be_uidt_nl << be_nl; + TAO_INSERT_COMMENT (os); *os << be_nl << "} // module " << node->name (); if (be_global->gen_anyop_files ()) { - *aos << be_uidt_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + *aos << be_uidt_nl << be_nl; + TAO_INSERT_COMMENT (aos); *aos << be_nl << "} // module " << node->name () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp b/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp index 53e787c0e30..9fdb5f2cd0c 100644 --- a/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp @@ -31,8 +31,7 @@ be_visitor_module_sh::visit_module (be_module *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the skeleton class name. @@ -62,8 +61,8 @@ be_visitor_module_sh::visit_module (be_module *node) -1); } - *os << be_uidt_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + *os << be_uidt_nl << be_nl; + TAO_INSERT_COMMENT (os); *os << "} // module " << node->name (); diff --git a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp index 0ff00c5ff9c..670f885ceaa 100644 --- a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp @@ -35,10 +35,7 @@ be_visitor_native_ch::visit_native (be_native *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (os); const char *node_name = node->full_name (); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp index d787bde8e24..55c754c1b2e 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp @@ -56,8 +56,7 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "void "; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp index cb5790d5e41..ef1b11284fd 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp @@ -73,8 +73,7 @@ be_visitor_amh_rh_operation_ss::visit_operation (be_operation *node) buf = nullptr; // Step 1 : Generate return type: always void - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << response_handler_implementation_name.c_str () << "::"; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp index 401b33a299b..c877e53187d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp @@ -123,8 +123,7 @@ be_visitor_amh_operation_sh::generate_shared_prologue ( TAO_OutStream *os, const char *skel_prefix) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "static void " << skel_prefix << this->ctx_->port_prefix ().c_str () diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp index d188e056618..6c7bd3eb425 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp @@ -301,8 +301,7 @@ be_visitor_amh_operation_ss::generate_shared_prologue (be_decl *node, TAO_OutStream *os, const char *skel_prefix) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // We need the interface node in which this operation was defined. However, // if this operation node was an attribute node in disguise, we get this 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 b073286e4d7..3e59a0dc416 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp @@ -51,8 +51,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the return type mapping. Return type is simply void. *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp index aab0e909e4b..f1918f568b1 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp @@ -53,8 +53,7 @@ be_visitor_operation_direct_proxy_impl_ss::visit_operation ( } } - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << intf->full_direct_proxy_impl_name () << "::"; 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 ec94769a15e..0a97ddb3e8d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp @@ -84,8 +84,7 @@ be_visitor_operation_cs::visit_operation (be_operation *node) return 0; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Retrieve the operation return type. be_type *bt = dynamic_cast<be_type*> (node->return_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp index 26ab9dace41..f72f65c46d4 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp @@ -36,8 +36,7 @@ be_visitor_operation_ih::visit_operation (be_operation *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } // every operation is declared virtual in the client code 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 2de4bd8c983..8ed90f466bb 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp @@ -48,8 +48,7 @@ be_visitor_operation_is::visit_operation (be_operation *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } be_visitor_context ctx (*this->ctx_); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp index d26e0eb61eb..4ebc3183199 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp @@ -32,8 +32,7 @@ be_visitor_operation_sh::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "virtual "; 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 a3256880c8e..3bccb12acba 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -164,8 +164,7 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, intf->full_skel_name (), upcall_command_name.c_str ()); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void " << intf->full_skel_name () << "::"; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp index 87bdd4dc2da..4ccd4afe626 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp @@ -22,8 +22,7 @@ int be_visitor_operation_proxy_impl_xh::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "static void" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp index fb24e5ed20d..39fb690509f 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp @@ -47,8 +47,7 @@ be_visitor_operation_tie_sh::visit_operation (be_operation *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_visitor_context ctx (*this->ctx_); be_visitor_operation_rettype oro_visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp index 6d68b3ec985..98b36380c26 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp @@ -88,8 +88,7 @@ int be_visitor_operation_tie_ss::visit_operation (be_operation *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "template <class " << template_name.c_str () << ">" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp index 6cd6515a881..041af2c2dc1 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp @@ -76,8 +76,7 @@ be_visitor_operation_upcall_command_ss::visit ( // save the node. this->ctx_->node (node); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the operation-specific TAO::Upcall_Command concrete // class. diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp index d2cfc9934c8..100195bb188 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp @@ -152,9 +152,7 @@ be_visitor_root_ch::gen_fwd_decls () { if (idl_global->non_local_iface_seen_) { - *o_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (o_); *o_ << be_global->core_versioning_begin () << be_nl; @@ -187,9 +185,7 @@ be_visitor_root_ch::gen_ref_counting_overrides () size_t index = 0; be_interface_fwd *ifwd = nullptr; - *o_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (o_); for (index = 0; index < size; ++index) { @@ -233,10 +229,7 @@ be_visitor_root_ch::gen_static_corba_overrides () size_t index = 0; AST_Interface *i = nullptr; - *o_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl; + TAO_INSERT_COMMENT (o_); *o_ << be_global->core_versioning_begin (); diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp index 99b145d6462..2eed2e11736 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp @@ -61,8 +61,7 @@ be_visitor_root_sth::visit_module (be_module *node) // Generate the skeleton class name. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Now generate the class definition. The prefix POA_ is prepended to our // name only if we are the outermost module. diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp index 5cc90dcf290..9dcc690abe3 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp @@ -43,8 +43,7 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp index a49fdcbeeb6..77fb2089457 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp @@ -40,9 +40,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp index 0dd0d3522b7..e13e3d03d0f 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp @@ -61,8 +61,7 @@ be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node) be_type *bt = dynamic_cast<be_type*> (node); be_typedef *tdef = dynamic_cast<be_typedef*> (bt); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we're an anonymous sequence, we must protect against // being declared more than once. diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp index e54fa0d0c03..a0a8a3d7797 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp @@ -89,8 +89,7 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "#if !defined _TAO_CDR_OP_" << node->flat_name () << "_CPP_" << be_nl 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 6456054dfbe..350354c8fc2 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -95,8 +95,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (idl_global->dcps_sequence_type_defined (node->full_name ())) { 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 c7c0fd437a2..13609f31b03 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp @@ -101,8 +101,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); os->gen_ifdef_macro (node->flat_name ()); diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp index 616e6662b03..d2d38a5d6f5 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp @@ -34,8 +34,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; if (node->is_nested ()) diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index 1cf479aefdf..d5b58da6f56 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -34,9 +34,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Since we don't generate CDR stream operators for types that // explicitly contain a local interface (at some level), we diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp index dec58f3f0b4..a3c6bffa5c6 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp @@ -34,8 +34,7 @@ be_visitor_structure_cdr_op_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp index ed19672a653..2327f40ae93 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp @@ -45,8 +45,7 @@ be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp index 24bbbdf3550..73ccf1f1a89 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp @@ -44,8 +44,7 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "struct " << be_global->stub_export_macro () << " " diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp index 29028da44cb..f7652d69f8e 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp @@ -52,8 +52,7 @@ be_visitor_structure_cs::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << node->name () diff --git a/TAO/TAO_IDL/be/be_visitor_template_export.cpp b/TAO/TAO_IDL/be/be_visitor_template_export.cpp index 59dce19e81c..6e3a9d6a249 100644 --- a/TAO/TAO_IDL/be/be_visitor_template_export.cpp +++ b/TAO/TAO_IDL/be/be_visitor_template_export.cpp @@ -34,8 +34,7 @@ be_visitor_template_export::visit_root (be_root *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "#if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT"; diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index 976f1e16dc3..305be5d4107 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -55,9 +55,7 @@ be_visitor_traits::visit_root (be_root *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl << be_global->core_versioning_begin (); diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp index 59636667018..17ab3682ae8 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp @@ -44,9 +44,7 @@ TAO::be_visitor_alias_typecode::common (be_type * node, { TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp index 1e641558d78..394eebd109f 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp @@ -24,9 +24,7 @@ TAO::be_visitor_enum_typecode::visit_enum (be_enum * node) { TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (&os); ACE_CString const tao_enumerators ("_tao_enumerators_"); ACE_CString const enumerators_name (tao_enumerators diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp index 74177b36dbc..fdaf252ac51 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp @@ -65,9 +65,7 @@ TAO::be_visitor_objref_typecode::visit_i (char const * kind, { TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the TypeCode instantiation. os diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp index ff909252566..8bc43ce8117 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp @@ -81,9 +81,7 @@ TAO::be_visitor_struct_typecode::visit (AST_Structure * node, this->is_nested_ = true; TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); if (this->gen_member_typecodes (node) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp index 46b547a446b..ff485166b9e 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp @@ -30,8 +30,7 @@ be_visitor_typecode_decl::visit_type (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // If -GA is used but anyop macro isn't set, defaults to stub macro. const char *export_macro = (be_global->gen_anyop_files () 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 9696d002830..63944a3a422 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -293,9 +293,7 @@ be_visitor_typecode_defn::visit_array (be_array *node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // generate typecode for the base type this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); @@ -456,9 +454,7 @@ be_visitor_typecode_defn::visit_sequence (be_sequence * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // generate typecode for the base type this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); @@ -551,9 +547,7 @@ be_visitor_typecode_defn::visit_string (be_string * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // Multiple definition guards. // @todo Can we automate duplicate detection within the IDL compiler diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp index 4ed2f4d340a..d32a9d21b71 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp @@ -60,9 +60,7 @@ TAO::be_visitor_union_typecode::visit_union (be_union * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); be_type * const discriminant_type = dynamic_cast<be_type*> (node->disc_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp index 0fce2fa7734..6b711d34a80 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp @@ -60,9 +60,7 @@ TAO::be_visitor_value_typecode::visit_valuetype (be_valuetype * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); if (this->gen_member_typecodes (node) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp index 11ece6e78d2..888c585b085 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp @@ -175,8 +175,7 @@ be_visitor_typedef_ch::visit_array (be_array *node) } else { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Base type is simply an alias to an array node. Simply output the // required typedefs. @@ -286,8 +285,7 @@ be_visitor_typedef_ch::visit_enum (be_enum *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // typedef the type and the _slice type. *os << "typedef " << bt->nested_type_name (scope) @@ -317,8 +315,7 @@ be_visitor_typedef_ch::visit_interface (be_interface *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the object. *os << "typedef " << bt->nested_type_name (scope) << " " @@ -366,8 +363,7 @@ be_visitor_typedef_ch::visit_predefined_type (be_predefined_type *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -400,8 +396,7 @@ be_visitor_typedef_ch::visit_string (be_string *node) be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (node->width () == (long) sizeof (char)) { @@ -459,8 +454,7 @@ be_visitor_typedef_ch::visit_sequence (be_sequence *node) } else { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -506,8 +500,7 @@ be_visitor_typedef_ch::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -552,8 +545,7 @@ be_visitor_typedef_ch::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -585,8 +577,7 @@ be_visitor_typedef_ch::visit_valuebox (be_valuebox *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the object. *os << "typedef " << bt->nested_type_name (scope) << " " @@ -621,8 +612,7 @@ be_visitor_typedef_ch::visit_valuetype (be_valuetype *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the object. *os << "typedef " << bt->nested_type_name (scope) << " " diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp index b8b2a3eedc9..c1df6701ac6 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp @@ -33,8 +33,7 @@ be_visitor_union_any_op_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index d0c95024982..67bcc498c21 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -32,9 +32,7 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp index 142279b0dbf..9457b43b1c5 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp @@ -34,8 +34,7 @@ be_visitor_union_cdr_op_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp index 9072ec9a74b..fd251f41596 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp @@ -113,8 +113,7 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; @@ -123,8 +122,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) *os << "::CORBA::Boolean operator<< (" << be_idt << be_idt_nl << "TAO_OutputCDR &strm," << be_nl - << "const " << node->name () << " &_tao_union" << be_uidt_nl - << ")" << be_uidt_nl + << "const " << node->name () << " &_tao_union)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; serialize_disc (os, node->udisc_type (), true /* out */); @@ -169,8 +168,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT); *os << "::CORBA::Boolean operator>> (" << be_idt << be_idt_nl << "TAO_InputCDR &strm," << be_nl - << node->name () << " &_tao_union" << be_uidt_nl - << ")" << be_uidt_nl + << node->name () << " &_tao_union)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; be_type* disc_type = diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp index 9f4f09196be..94558197453 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp @@ -63,8 +63,7 @@ be_visitor_union_discriminant_ch::visit_enum (be_enum *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // The set method. *os << be_nl_2 @@ -96,8 +95,7 @@ be_visitor_union_discriminant_ch::visit_predefined_type (be_predefined_type TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // The set method. *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp index 5fe1cfe59a2..b2e2c62a754 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp @@ -51,8 +51,7 @@ be_visitor_union_discriminant_ci::visit_enum (be_enum *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if ((dv.computed_ != 0) && (bu->default_index () == -1)) { @@ -141,8 +140,7 @@ be_visitor_union_discriminant_ci::visit_predefined_type ( -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if ((dv.computed_ != 0) && (bu->default_index () == -1)) { 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 3943c07a55f..31cd1ffa4bf 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp @@ -117,8 +117,7 @@ int be_visitor_union_ch::visit_union (be_union *node) if ((dv.computed_ != 0) && (node->default_index () == -1)) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Only if all cases are not covered AND there is no explicit // default, we get the _default () method. 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 47bab908e32..09d5c0df80b 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp @@ -32,8 +32,7 @@ int be_visitor_union_ci::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// *************************************************************" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp index 5cfcba36781..66b5843fc78 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp @@ -72,8 +72,7 @@ int be_visitor_union_cs::visit_union (be_union *node) // Now generate the operations on the union such as the copy constructor // and the assignment operator. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the copy constructor and the assignment operator here. *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp index f02c02b38a8..869aadd95ce 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp @@ -145,7 +145,7 @@ be_visitor_union_branch_cdr_op_cs::visit_array (be_array *node) << be_idt << be_idt_nl << "_tao_union_tmp" << be_uidt_nl << ");" << be_uidt_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -203,7 +203,7 @@ be_visitor_union_branch_cdr_op_cs::visit_enum (be_enum *node) case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp =" << be_idt_nl << "static_cast<" << node->name () << "> (0UL);" << be_uidt_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -283,7 +283,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface (be_interface *node) else { *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -363,7 +363,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface_fwd (be_interface_fwd *node) else { *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -442,7 +442,7 @@ be_visitor_union_branch_cdr_op_cs::emit_valuetype_common (be_type *node) { case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -506,7 +506,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( { *os << "::CORBA::Object_var _tao_union_tmp;" << be_nl; - *os << "result = strm >> _tao_union_tmp.out ();" << be_nl_2 + *os << "result = strm >> _tao_union_tmp.out ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp.in ());"; @@ -515,7 +515,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else if (pt == AST_PredefinedType::PT_pseudo) { *os << "::CORBA::TypeCode_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.out ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.out ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp.in ());"; @@ -524,7 +524,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else if (pt == AST_PredefinedType::PT_value) { *os << "::CORBA::ValueBase * _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp);"; @@ -535,7 +535,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Char _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_char _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -546,7 +546,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::WChar _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_wchar _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -557,7 +557,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Octet _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_octet _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -568,7 +568,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Boolean _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_boolean _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -579,7 +579,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::UInt8 _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_uint8 _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -590,7 +590,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Int8 _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_int8 _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -599,7 +599,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else { *os << node->name () << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -735,7 +735,7 @@ be_visitor_union_branch_cdr_op_cs::visit_sequence (be_sequence *node) } *os << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -805,19 +805,19 @@ be_visitor_union_branch_cdr_op_cs::visit_string (be_string *node) *os << "result = strm >> ACE_InputCDR::to_string (" << "_tao_union_tmp.out (), " << node->max_size ()->ev ()->u.ulval << ");" - << be_nl_2; + << be_nl; } else { *os << "result = strm >> ACE_InputCDR::to_wstring (" << "_tao_union_tmp.out (), " << node->max_size ()->ev ()->u.ulval << ");" - << be_nl_2; + << be_nl; } } else { - *os << "result = strm >> _tao_union_tmp.out ();" << be_nl_2; + *os << "result = strm >> _tao_union_tmp.out ();" << be_nl; } *os << "if (result)" << be_idt_nl @@ -913,7 +913,7 @@ be_visitor_union_branch_cdr_op_cs::visit_structure (be_structure *node) { case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -1011,7 +1011,7 @@ be_visitor_union_branch_cdr_op_cs::visit_union (be_union *node) case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp" << ";" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp index a9aef5adc87..c3221ecb164 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp @@ -86,8 +86,7 @@ be_visitor_union_branch_private_ch::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -136,8 +135,7 @@ be_visitor_union_branch_private_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -175,8 +173,7 @@ be_visitor_union_branch_private_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -214,8 +211,7 @@ be_visitor_union_branch_private_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -253,8 +249,7 @@ be_visitor_union_branch_private_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -292,8 +287,7 @@ be_visitor_union_branch_private_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -331,8 +325,7 @@ be_visitor_union_branch_private_ch::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -373,8 +366,7 @@ be_visitor_union_branch_private_ch::visit_predefined_type ( TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -440,8 +432,7 @@ be_visitor_union_branch_private_ch::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -470,8 +461,7 @@ be_visitor_union_branch_private_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -515,8 +505,7 @@ be_visitor_union_branch_private_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -595,8 +584,7 @@ be_visitor_union_branch_private_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp index 566027008ec..0bfe7299cb5 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp @@ -108,8 +108,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) ctx.state (TAO_CodeGen::TAO_ROOT_CH); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Now use this array as a "type" for the subsequent declarator // the set method. @@ -122,8 +121,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) } else { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Now use this array as a "type" for the subsequent declarator // the set method. @@ -185,8 +183,7 @@ be_visitor_union_branch_public_ch::visit_enum (be_enum *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Now use this enum as a "type" for the subsequent declarator // the set method. @@ -229,8 +226,7 @@ be_visitor_union_branch_public_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -272,8 +268,7 @@ be_visitor_union_branch_public_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -315,8 +310,7 @@ be_visitor_union_branch_public_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -358,8 +352,7 @@ be_visitor_union_branch_public_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -401,8 +394,7 @@ be_visitor_union_branch_public_ch::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -445,8 +437,7 @@ be_visitor_union_branch_public_ch::visit_predefined_type (be_predefined_type *no TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -533,8 +524,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the anonymous sequence member typedef. // This provides a consistent name to use instead of the @@ -544,8 +534,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) << " _" << ub->local_name () << "_seq;"; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "void " << ub->local_name () << " (const " @@ -576,8 +565,7 @@ be_visitor_union_branch_public_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Three methods to set the string value if (node->width () == (long) sizeof (char)) @@ -652,8 +640,7 @@ be_visitor_union_branch_public_ch::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "void " << ub->local_name () << " (const " @@ -745,8 +732,7 @@ be_visitor_union_branch_public_ch::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "void " << ub->local_name () << " (const " 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 add0becee4e..8f5706337c5 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 @@ -153,8 +153,7 @@ be_visitor_union_branch_public_ci::visit_array (be_array *node) } // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -225,8 +224,7 @@ be_visitor_union_branch_public_ci::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -296,8 +294,7 @@ be_visitor_union_branch_public_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -386,8 +383,7 @@ be_visitor_union_branch_public_ci::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -494,8 +490,7 @@ be_visitor_union_branch_public_ci::emit_valuetype_common (be_type *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -573,8 +568,7 @@ be_visitor_union_branch_public_ci::visit_predefined_type ( TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -784,8 +778,7 @@ be_visitor_union_branch_public_ci::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "/// Accessor to set the member." << be_nl @@ -858,8 +851,7 @@ be_visitor_union_branch_public_ci::visit_string (be_string *node) // Three methods to set the string value. // (1) Set method from char* or wchar*. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -1061,8 +1053,7 @@ be_visitor_union_branch_public_ci::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "/// Accessor to set the member." << be_nl @@ -1228,8 +1219,7 @@ be_visitor_union_branch_public_ci::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "// Accessor to set the member." << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp index 7d17a24f206..4c2220eac59 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp @@ -39,8 +39,7 @@ be_visitor_valuebox_any_op_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp index 082faf2daf5..ec440763a71 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp @@ -42,8 +42,7 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) // Generate the Any <<= and >>= operator declarations - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp index 30afffb23ee..5eba86429a6 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp @@ -34,9 +34,7 @@ be_visitor_valuebox_cdr_op_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp index b1dd90b58f9..06f1f396911 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp @@ -37,10 +37,9 @@ be_visitor_valuebox_cdr_op_cs::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); node->cli_stub_cdr_op_gen (true); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); -*os << be_global->core_versioning_begin () << be_nl; + *os << be_global->core_versioning_begin () << be_nl; // Set the sub state as generating code for the output operator. this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp index fa546645e9b..30516f8ea3d 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp @@ -122,8 +122,7 @@ be_visitor_valuebox_field_ch::visit_array (be_array *node) } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void " << field->local_name () << " (" << fname << ");" << be_nl; @@ -160,8 +159,7 @@ be_visitor_valuebox_field_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_get (field, bt, "", "", "const"); @@ -196,8 +194,7 @@ be_visitor_valuebox_field_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -232,8 +229,7 @@ be_visitor_valuebox_field_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -282,8 +278,7 @@ be_visitor_valuebox_field_ch::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -335,8 +330,7 @@ be_visitor_valuebox_field_ch::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -373,8 +367,7 @@ be_visitor_valuebox_field_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_set (field, bt, "const ", ""); @@ -424,8 +417,7 @@ be_visitor_valuebox_field_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -484,8 +476,7 @@ be_visitor_valuebox_field_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp index 31bbb25ea69..befadc961dc 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp @@ -120,8 +120,7 @@ be_visitor_valuebox_field_ci::visit_array (be_array *node) bt->full_name ()); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Modifier to set the member." << be_nl; @@ -174,9 +173,7 @@ be_visitor_valuebox_field_ci::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_get (field, bt, "", "", "const", ""); @@ -211,8 +208,7 @@ be_visitor_valuebox_field_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Modifier to set the member." << be_nl; @@ -257,8 +253,7 @@ be_visitor_valuebox_field_ci::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Modifier to set the member." << be_nl; @@ -331,8 +326,7 @@ be_visitor_valuebox_field_ci::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -393,8 +387,7 @@ be_visitor_valuebox_field_ci::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const", ""); @@ -430,8 +423,7 @@ be_visitor_valuebox_field_ci::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_set (field, bt, "const ", ""); @@ -488,8 +480,7 @@ be_visitor_valuebox_field_ci::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const", ""); @@ -544,8 +535,7 @@ be_visitor_valuebox_field_ci::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const", ""); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp index 562a4fa0dea..18c7a86cf41 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp @@ -118,8 +118,7 @@ be_visitor_valuebox_union_member_ci::visit_array (be_array *node) bt->full_name ()); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Modifier to set the member." << be_nl; @@ -171,9 +170,7 @@ be_visitor_valuebox_union_member_ci::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_get (field, bt, "", "", "const"); @@ -208,8 +205,7 @@ be_visitor_valuebox_union_member_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -244,8 +240,7 @@ be_visitor_valuebox_union_member_ci::visit_interface_fwd (be_interface_fwd *node TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -294,8 +289,7 @@ be_visitor_valuebox_union_member_ci::visit_predefined_type (be_predefined_type * TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -347,8 +341,7 @@ be_visitor_valuebox_union_member_ci::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -384,8 +377,7 @@ be_visitor_valuebox_union_member_ci::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_set (field, bt, "const ", ""); @@ -442,8 +434,7 @@ be_visitor_valuebox_union_member_ci::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -498,8 +489,7 @@ be_visitor_valuebox_union_member_ci::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp index 63fbc5addff..9fde836d8b6 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp @@ -37,8 +37,7 @@ be_visitor_valuebox_ch::visit_valuebox (be_valuebox *node) this->ctx_->node (node); // save the node - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "class " << node->local_name () << ";" ; @@ -110,8 +109,7 @@ be_visitor_valuebox_ch::visit_valuebox (be_valuebox *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the "protected" destructor @@ -163,8 +161,7 @@ be_visitor_valuebox_ch::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -282,8 +279,7 @@ be_visitor_valuebox_ch::visit_sequence (be_sequence *node) // Indicate that this type has been used as a sequence element. bt->seen_in_sequence (true); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -402,8 +398,7 @@ be_visitor_valuebox_ch::visit_string (be_string *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor (); this->emit_constructor_one_arg (node, "", "", ""); @@ -474,8 +469,7 @@ be_visitor_valuebox_ch::visit_structure (be_structure *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -542,8 +536,7 @@ be_visitor_valuebox_ch::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Member variable of underlying type; this->emit_boxed_member_var (node, "_var"); @@ -576,8 +569,7 @@ be_visitor_valuebox_ch::visit_union (be_union *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -668,9 +660,7 @@ be_visitor_valuebox_ch::visit_union (be_union *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - + TAO_INSERT_COMMENT (os); // Member variable of underlying type; this->emit_boxed_member_var (node, "_var"); @@ -686,8 +676,7 @@ be_visitor_valuebox_ch::emit_for_predef_enum (be_type *node, { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp index 1e1f560c15c..429e571b166 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp @@ -45,8 +45,7 @@ be_visitor_valuebox_ci::visit_valuebox (be_valuebox *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "ACE_INLINE const char*" << be_nl << node->name () << "::_tao_obv_static_repository_id ()" << be_nl @@ -68,8 +67,7 @@ be_visitor_valuebox_ci::visit_array (be_array *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Public default constructor *os << "ACE_INLINE" << be_nl @@ -216,8 +214,7 @@ be_visitor_valuebox_ci::visit_sequence (be_sequence *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor_alloc (node); this->emit_constructor_one_arg_alloc (node); @@ -278,8 +275,7 @@ be_visitor_valuebox_ci::visit_string (be_string *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor (); this->emit_constructor_one_arg (node, ""); @@ -394,8 +390,7 @@ be_visitor_valuebox_ci::visit_structure (be_structure *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor_alloc (node); this->emit_constructor_one_arg_alloc (node); @@ -475,8 +470,7 @@ be_visitor_valuebox_ci::visit_union (be_union *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor_alloc (node); this->emit_constructor_one_arg_alloc (node); @@ -575,8 +569,7 @@ be_visitor_valuebox_ci::emit_for_predef_enum (be_type *node, // Retrieve the node being visited by this be_visitor_valuebox_ci. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (is_any) { diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp index 91d897f3cd4..25c627a1d8f 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp @@ -48,8 +48,7 @@ be_visitor_valuebox_cs::visit_valuebox (be_valuebox *node) this->ctx_->node (node); // save the node - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->is_defined ()) { @@ -334,8 +333,7 @@ be_visitor_valuebox_cs::visit_array (be_array * node) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -360,8 +358,7 @@ be_visitor_valuebox_cs::visit_enum (be_enum *) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -477,8 +474,7 @@ be_visitor_valuebox_cs::visit_sequence (be_sequence *node) ctx.state (TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CH); be_visitor_sequence_buffer_type bt_visitor (&ctx); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (node->unbounded ()) { @@ -631,8 +627,7 @@ be_visitor_valuebox_cs::visit_string (be_string *str) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -677,8 +672,7 @@ be_visitor_valuebox_cs::visit_structure (be_structure *) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -719,8 +713,7 @@ be_visitor_valuebox_cs::visit_union (be_union *) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -756,8 +749,7 @@ be_visitor_valuebox_cs::emit_for_predef_enum (char const * marshal_arg) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp index e36744ab7c6..2860bc32c19 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp @@ -39,8 +39,7 @@ be_visitor_valuetype_any_op_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp index e12e0aea8cf..4c3d88d78c2 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp @@ -41,8 +41,7 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) // Generate the Any <<= and >>= operator declarations - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp index d25849117d9..b7bd2760bc7 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp @@ -44,9 +44,7 @@ be_visitor_valuetype_cdr_op_ch::visit_valuetype (be_valuetype *node) -1); } - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp index 2e5ba73463d..fd6ae6a782f 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp @@ -56,8 +56,7 @@ be_visitor_valuetype_cdr_op_cs::visit_valuetype (be_valuetype *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp index 772ff73a4b4..6da083d21e5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp @@ -86,8 +86,7 @@ be_visitor_valuetype_field_ch::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (bt->node_type () != AST_Decl::NT_typedef && bt->is_child (bu)) @@ -169,8 +168,7 @@ be_visitor_valuetype_field_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (bt->node_type () != AST_Decl::NT_typedef && bt->is_child (bu)) @@ -228,8 +226,7 @@ be_visitor_valuetype_field_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " ( ::" @@ -271,8 +268,7 @@ be_visitor_valuetype_field_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -314,8 +310,7 @@ be_visitor_valuetype_field_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -357,8 +352,7 @@ be_visitor_valuetype_field_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -406,8 +400,7 @@ be_visitor_valuetype_field_ch::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -455,8 +448,7 @@ be_visitor_valuetype_field_ch::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -529,8 +521,7 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Not a typedef and bt is defined here. if (bt->node_type () != AST_Decl::NT_typedef @@ -604,8 +595,7 @@ be_visitor_valuetype_field_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2<< "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Three methods to set the string value. if (node->width () == (long) sizeof (char)) @@ -670,8 +660,7 @@ be_visitor_valuetype_field_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2<< "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Not a typedef and bt is defined here. if (bt->node_type () != AST_Decl::NT_typedef @@ -755,8 +744,7 @@ be_visitor_valuetype_field_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2<< "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Not a typedef and bt is defined here. if (bt->node_type () != AST_Decl::NT_typedef 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 1e591d5837d..4718e7dea8c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp @@ -138,8 +138,7 @@ be_visitor_valuetype_field_cs::visit_array (be_array *node) bt->full_name ()); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -214,8 +213,7 @@ be_visitor_valuetype_field_cs::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op() << "void" << be_nl; @@ -283,8 +281,7 @@ be_visitor_valuetype_field_cs::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -352,8 +349,7 @@ be_visitor_valuetype_field_cs::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -426,8 +422,7 @@ be_visitor_valuetype_field_cs::valuetype_common (be_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -507,8 +502,7 @@ be_visitor_valuetype_field_cs::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -583,8 +577,7 @@ be_visitor_valuetype_field_cs::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -758,8 +751,7 @@ be_visitor_valuetype_field_cs::visit_sequence (be_sequence *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) set from a const *os << "/// Accessor to set the member." << be_nl @@ -830,8 +822,7 @@ be_visitor_valuetype_field_cs::visit_string (be_string *node) // Three methods to set the string value. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -999,8 +990,7 @@ be_visitor_valuetype_field_cs::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "/// Accessor to set the member." << be_nl @@ -1116,8 +1106,7 @@ be_visitor_valuetype_field_cs::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member" << be_nl << this->pre_op () << "void" << be_nl; 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 201b7a51ac1..190b8307592 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp @@ -29,8 +29,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "::CORBA::Boolean" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp index 584916719f8..afc93201be3 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp @@ -40,8 +40,7 @@ be_visitor_obv_module::visit_module (be_module *node) if (this->ctx_->state () == TAO_CodeGen::TAO_MODULE_OBV_CH) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "namespace "; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp index 89ec6a82ac8..c03b411a649 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp @@ -832,8 +832,7 @@ be_visitor_valuetype::gen_init_defn (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "class " << be_global->stub_export_macro () << " " << node->local_name () 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 3694cf2e480..dff6922a75b 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -46,8 +46,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); int status = 0; - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->node_type () == AST_Decl::NT_eventtype) { @@ -234,8 +233,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we inherit from CORBA::Object and/or CORBA::AbstractBase // (in addition to CORBA::ValueBase) we have to add these @@ -392,8 +390,7 @@ be_visitor_valuetype_ch::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); // save the node - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); // Every operation is declared public and virtual in the client code. *os << be_uidt_nl << "public:" << be_idt_nl << "virtual "; 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 1bdeee1b047..1280d802d42 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp @@ -40,8 +40,7 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "ACE_INLINE" << be_nl; *os << node->name () << "::" << node->local_name () << " ()" << be_nl; 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 aef3ecbd8c3..f655680091a 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -49,8 +49,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->is_defined ()) { @@ -411,8 +410,7 @@ be_visitor_valuetype_cs::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // STEP I: Generate the return type. be_type *bt = dynamic_cast<be_type*> (node->return_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp index 99b203c0540..0059bc116e6 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp @@ -53,8 +53,7 @@ be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node) TAO_OutStream& os = *(this->ctx_->stream ()); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); //@@ If I'm generating concrete class I need a RefCounter. os << "class " << be_global->stub_export_macro () diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp index ed9631216f6..891d6e3c4f5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp @@ -69,8 +69,7 @@ be_visitor_valuetype_init_cs::visit_valuetype (be_valuetype *node) "%s_init", node->local_name ()); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // ctor *os << be_nl_2 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 4f3c0688e53..b8992bb9885 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 @@ -40,8 +40,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ ; + TAO_INSERT_COMMENT (os); // OBV_ class maps only to a typedef if we are optimizing accessors. if (node->opt_accessor ()) @@ -142,8 +141,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) // to avoid ambiguity. if (node->n_supports () > 0) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ ; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "virtual void _add_ref ();" << be_nl; *os << "virtual void _remove_ref ();"; 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 ade6488acd2..7f5eefe75cd 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 @@ -40,8 +40,7 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Default constructor. *os << node->full_obv_skel_name () << "::"; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp index c7032dde502..af8ab1d339c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp @@ -58,8 +58,7 @@ be_visitor_valuetype_sh::visit_valuetype (be_valuetype *node) class_name += node->local_name (); } - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the skeleton class name. *os << "class " << class_name.c_str () << ";" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp index 2b4f1096991..b529196273c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp @@ -53,8 +53,7 @@ be_visitor_valuetype_ss::visit_valuetype (be_valuetype *node) const char *full_skel_name = full_skel_name_holder.c_str (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Find if we are at the top scope or inside some module, // pre-compute the prefix that must be added to the local name in diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp index f2debe24349..8955dfffaac 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp @@ -51,8 +51,7 @@ be_visitor_valuetype_fwd_any_op_ch::visit_valuetype_fwd ( TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp index 026f4bcd769..477ac4c7d37 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp @@ -62,8 +62,7 @@ be_visitor_valuetype_fwd_cdr_op_ch::visit_valuetype_fwd ( // generate the CDR << and >> operator declarations (prototypes) - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be_include/be_helper.h b/TAO/TAO_IDL/be_include/be_helper.h index 1acdf87dbc5..5ba43cce6d6 100644 --- a/TAO/TAO_IDL/be_include/be_helper.h +++ b/TAO/TAO_IDL/be_include/be_helper.h @@ -218,6 +218,9 @@ public: TAO_OutStream &print (AST_Expression *idl); + void insert_comment (const char *file, int line); +#define TAO_INSERT_COMMENT(STRM) (STRM)->insert_comment (__FILE__, __LINE__) + protected: /// The underlying low-level I/O handle FILE *fp_; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp index 520709eff1d..3befe5193ec 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp @@ -9,6 +9,8 @@ #include "orbsvcs/Notify/PropertySeq.h" +#include "orbsvcs/orbsvcs/NotifyExtC.h" + TAO_BEGIN_VERSIONED_NAMESPACE_DECL /*****************************************************************************/ diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp index 67941639ea2..6aa02a42676 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp @@ -205,7 +205,7 @@ lookup_one_type (const char* type, // @@ Would have used Offer_Database::offer_iterator for less // coupling between TAO_Lookup and Offer_Database, but g++ barfs on // that. -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined (ACE_HAS_CPP20) TAO_Offer_Database<MAP_LOCK_TYPE>::offer_iterator offer_iter (type, offer_database); #else @@ -958,7 +958,7 @@ withdraw_using_constraint (const char *type, // Try to find the map of offers of desired service type. // @@ Again, should be Offer_Database::offer_iterator { -#if defined (_MSC_VER) +#if defined (_MSC_VER) && !defined (ACE_HAS_CPP20) TAO_Offer_Database<MAP_LOCK_TYPE>::offer_iterator offer_iter (type, offer_database); #else diff --git a/TAO/tao/CORBA_String.cpp b/TAO/tao/CORBA_String.cpp index aaa20da44ec..a0fe07ad895 100644 --- a/TAO/tao/CORBA_String.cpp +++ b/TAO/tao/CORBA_String.cpp @@ -31,9 +31,10 @@ istream & operator>> (istream &is, CORBA::String_var &sv) { is.seekg (0, ios::end); - sv = CORBA::string_alloc (static_cast<CORBA::ULong> (is.tellg ())); + std::streamsize const n = is.tellg (); + sv = CORBA::string_alloc (static_cast<CORBA::ULong> (n)); is.seekg (0, ios::beg); - is >> sv.inout (); + is.read (sv.inout (), n); return is; } @@ -48,12 +49,15 @@ istream & operator>> (istream &is, CORBA::String_out &so) { is.seekg (0, ios::end); - so = CORBA::string_alloc (static_cast<CORBA::ULong> (is.tellg ())); + std::streamsize const n = is.tellg (); + so = CORBA::string_alloc (static_cast<CORBA::ULong> (n)); is.seekg (0, ios::beg); - is >> so.ptr (); + is.read (so.ptr (), n); return is; } +#ifndef ACE_HAS_CPP20 + // Until we implement WString support for platforms with a // 4-byte wchar_t, we just define the following to emit // the CORBA::WChars one by one. @@ -136,6 +140,8 @@ operator>> (istream &is, CORBA::WString_out &wso) return is; } +#endif /* ACE_HAS_CPP20 */ + #endif /* ACE_LACKS_IOSTREAM_TOTALLY */ TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/CORBA_String.h b/TAO/tao/CORBA_String.h index 5e308bc9ad2..2338c9a03a4 100644 --- a/TAO/tao/CORBA_String.h +++ b/TAO/tao/CORBA_String.h @@ -273,6 +273,8 @@ TAO_Export ostream & operator<< (ostream &, CORBA::String_out &); TAO_Export istream & operator>> (istream &, CORBA::String_out &); + +# ifndef ACE_HAS_CPP20 TAO_Export ostream & operator<< (ostream &, const CORBA::WString_var &); TAO_Export istream & @@ -281,6 +283,7 @@ TAO_Export ostream & operator<< (ostream &, CORBA::WString_out &); TAO_Export istream & operator>> (istream &, CORBA::WString_out &); +# endif /* ACE_HAS_CPP20 */ # endif /* ACE_LACKS_IOSTREAM_TOTALLY */ diff --git a/TAO/tests/IDL_Test/IDL_Test.mpc b/TAO/tests/IDL_Test/IDL_Test.mpc index 7ac4384b33d..5a2c335032b 100644 --- a/TAO/tests/IDL_Test/IDL_Test.mpc +++ b/TAO/tests/IDL_Test/IDL_Test.mpc @@ -26,6 +26,7 @@ project(*IDL): taoserver, messaging, gen_ostream { Bug_3312_Regression.idl Bug_3819_Regression.idl Bug_3821_Regression.idl + expressions.idl full.idl fwd.idl gperf.idl @@ -147,6 +148,8 @@ project(*DLL): taoidldefaults, taolib, messaging { dif2S.cpp enum_in_structC.cpp enum_in_structS.cpp + expressionsC.cpp + expressionsS.cpp fullC.cpp fullS.cpp fwdC.cpp diff --git a/TAO/tests/IDL_Test/expressions.idl b/TAO/tests/IDL_Test/expressions.idl new file mode 100644 index 00000000000..50739eec980 --- /dev/null +++ b/TAO/tests/IDL_Test/expressions.idl @@ -0,0 +1,52 @@ +module ShortValues { + const short a = 6; + const short b = 3; + const short div = a / b; + const short mul = a * b; + const short add = a + b; + const short sub = a - b; + const short mod = a % b; +}; + +module LongValues { + const long a = 6; + const long b = 3; + const long div = a / b; + const long mul = a * b; + const long add = a + b; + const long sub = a - b; + const long mod = a % b; +}; + +module MixedIntValues { + const long div = LongValues::a / ShortValues::b; + const long mul = LongValues::a * ShortValues::b; + const long add = LongValues::a + ShortValues::b; + const long sub = LongValues::a - ShortValues::b; + const long mod = LongValues::a % ShortValues::b; +}; + +module FloatValues { + const float a = 6.0; + const float b = 3.0; + const float div = a / b; + const float mul = a * b; + const float add = a + b; + const float sub = a - b; +}; + +module DoubleValues { + const double a = 6.0; + const double b = 3.0; + const double div = a / b; + const double mul = a * b; + const double add = a + b; + const double sub = a - b; +}; + +module MixedFloatValues { + const double div = DoubleValues::a / FloatValues::b; + const double mul = DoubleValues::a * FloatValues::b; + const double add = DoubleValues::a + FloatValues::b; + const double sub = DoubleValues::a - FloatValues::b; +}; diff --git a/TAO/tests/IDL_Test/main.cpp b/TAO/tests/IDL_Test/main.cpp index 1fd8c57b4ef..f766683a587 100644 --- a/TAO/tests/IDL_Test/main.cpp +++ b/TAO/tests/IDL_Test/main.cpp @@ -17,6 +17,7 @@ #include "constantsC.h" #include "nested_scopeS.h" #include "typedefC.h" +#include "expressionsC.h" #include "ace/Log_Msg.h" #include "ace/OS_NS_string.h" @@ -79,8 +80,66 @@ struct something_handler { }; +template <typename Type> +void +expect_equals (int &error_count, const char *name, Type actual, Type expected) +{ + if (actual != expected) + { + *ACE_DEFAULT_LOG_STREAM + << "ERROR: For " << name << " expected: " << expected + << ", but got " << actual << "\n"; + ++error_count; + } +} + +void +test_expressions (int &error_count) +{ + expect_equals<CORBA::Short> (error_count, "ShortValues::a", ShortValues::a, 6); + expect_equals<CORBA::Short> (error_count, "ShortValues::b", ShortValues::b, 3); + expect_equals<CORBA::Short> (error_count, "ShortValues::div", ShortValues::div, 2); + expect_equals<CORBA::Short> (error_count, "ShortValues::mul", ShortValues::mul, 18); + expect_equals<CORBA::Short> (error_count, "ShortValues::add", ShortValues::add, 9); + expect_equals<CORBA::Short> (error_count, "ShortValues::sub", ShortValues::sub, 3); + expect_equals<CORBA::Short> (error_count, "ShortValues::mod", ShortValues::mod, 0); + + expect_equals<CORBA::Long> (error_count, "LongValues::a", LongValues::a, 6); + expect_equals<CORBA::Long> (error_count, "LongValues::b", LongValues::b, 3); + expect_equals<CORBA::Long> (error_count, "LongValues::div", LongValues::div, 2); + expect_equals<CORBA::Long> (error_count, "LongValues::mul", LongValues::mul, 18); + expect_equals<CORBA::Long> (error_count, "LongValues::add", LongValues::add, 9); + expect_equals<CORBA::Long> (error_count, "LongValues::sub", LongValues::sub, 3); + expect_equals<CORBA::Long> (error_count, "LongValues::mod", LongValues::mod, 0); + + expect_equals<CORBA::Long> (error_count, "MixedIntValues::div", MixedIntValues::div, 2); + expect_equals<CORBA::Long> (error_count, "MixedIntValues::mul", MixedIntValues::mul, 18); + expect_equals<CORBA::Long> (error_count, "MixedIntValues::add", MixedIntValues::add, 9); + expect_equals<CORBA::Long> (error_count, "MixedIntValues::sub", MixedIntValues::sub, 3); + expect_equals<CORBA::Long> (error_count, "MixedIntValues::mod", MixedIntValues::mod, 0); + + expect_equals<CORBA::Float> (error_count, "FloatValues::a", FloatValues::a, 6.0f); + expect_equals<CORBA::Float> (error_count, "FloatValues::b", FloatValues::b, 3.0f); + expect_equals<CORBA::Float> (error_count, "FloatValues::div", FloatValues::div, 2.0f); + expect_equals<CORBA::Float> (error_count, "FloatValues::mul", FloatValues::mul, 18.0f); + expect_equals<CORBA::Float> (error_count, "FloatValues::add", FloatValues::add, 9.0f); + expect_equals<CORBA::Float> (error_count, "FloatValues::sub", FloatValues::sub, 3.0f); + + expect_equals<CORBA::Double> (error_count, "DoubleValues::a", DoubleValues::a, 6.0); + expect_equals<CORBA::Double> (error_count, "DoubleValues::b", DoubleValues::b, 3.0); + expect_equals<CORBA::Double> (error_count, "DoubleValues::div", DoubleValues::div, 2.0); + expect_equals<CORBA::Double> (error_count, "DoubleValues::mul", DoubleValues::mul, 18.0); + expect_equals<CORBA::Double> (error_count, "DoubleValues::add", DoubleValues::add, 9.0); + expect_equals<CORBA::Double> (error_count, "DoubleValues::sub", DoubleValues::sub, 3.0); + + expect_equals<CORBA::Double> (error_count, "MixedFloatValues::div", MixedFloatValues::div, 2.0); + expect_equals<CORBA::Double> (error_count, "MixedFloatValues::mul", MixedFloatValues::mul, 18.0); + expect_equals<CORBA::Double> (error_count, "MixedFloatValues::add", MixedFloatValues::add, 9.0); + expect_equals<CORBA::Double> (error_count, "MixedFloatValues::sub", MixedFloatValues::sub, 3.0); +} + int -ACE_TMAIN(int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int error_count = 0; @@ -175,8 +234,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Check whether the implementation of Dubble and Toil are generated CommaList::Dubble dub; CommaList::Toil toi; - dub.length(4); - toi.length(4); + dub.length (4); + toi.length (4); ciao_i c; id = root_poa->activate_object (&c); @@ -326,7 +385,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) if (!dynamic_cast<POA_bug_1985_c::d::AMI_somethingHandler*> (&x)) { ++error_count; - ACE_ERROR( (LM_ERROR, + ACE_ERROR ((LM_ERROR, "mismatch in downcast for %C\n", base[0])); } @@ -415,5 +474,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) return 1; } - return error_count; + test_expressions (error_count); + + return error_count ? 1 : 0; } |