summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza@objectcomputing.com>2021-10-31 21:38:48 -0500
committerAdam Mitz <mitza@objectcomputing.com>2021-11-03 18:42:46 -0500
commitecbca0bd527eb34e4568c5b5a8abf54667dccebd (patch)
treec767c598078ddc372a547006a3e1b6e010cc3749
parent81fe8e4219fb2b6d43dc2c09e6acbc4151431bdc (diff)
downloadATCD-ecbca0bd527eb34e4568c5b5a8abf54667dccebd.tar.gz
tao_idl updates for /std:c++20
resolved ambiguous call to operator<< by refactoring to avoid repetition of the same statement 300 times
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp82
-rw-r--r--TAO/TAO_IDL/be/be_helper.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_type.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_valuetype.cpp13
-rw-r--r--TAO/TAO_IDL/be/be_visitor_arg_traits.cpp36
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp14
-rw-r--r--TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp5
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp13
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_template_export.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_traits.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp30
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp36
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp42
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp30
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp5
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp27
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp28
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp28
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp31
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp21
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp24
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp36
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp33
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp9
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp3
-rw-r--r--TAO/TAO_IDL/be_include/be_helper.h3
139 files changed, 310 insertions, 662 deletions
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index d6d68aba616..efd8d1f0cc2 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_);
@@ -1594,10 +1556,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_);
@@ -1651,10 +1610,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_);
@@ -1681,9 +1637,7 @@ TAO_CodeGen::end_client_header (void)
{
// 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.
@@ -1825,9 +1779,7 @@ TAO_CodeGen::end_implementation_header (const char *fname)
int
TAO_CodeGen::end_server_template_header (void)
{
- *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 98f1f0e3649..463f869250d 100644
--- a/TAO/TAO_IDL/be/be_helper.cpp
+++ b/TAO/TAO_IDL/be/be_helper.cpp
@@ -645,3 +645,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 37c651ade8a..9053cf27f47 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 (void)
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 (),
@@ -1859,8 +1858,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 f1d0f9fe6e4..3824be2f1b0 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 ();
@@ -299,9 +298,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 3dd6cef7936..db81c651f1a 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 (void)
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 b1528b48f1c..0b1ab3d5f9d 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");
@@ -245,9 +242,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
@@ -301,9 +296,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");
@@ -425,8 +418,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");
@@ -505,8 +497,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");
@@ -585,8 +576,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");
@@ -679,8 +669,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 ();
@@ -898,8 +887,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
@@ -941,8 +929,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
@@ -1052,8 +1039,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 602ab334825..407755fac1b 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
@@ -33,8 +33,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 163c65fc6e5..ce41642eb0a 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
@@ -32,9 +32,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 affd9b6e14d..323a85c1757 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp
@@ -48,8 +48,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 a57454afa0f..354d08b3469 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
@@ -143,8 +143,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 310c641cb70..66afe86a2c1 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp
@@ -90,8 +90,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 2f57e164eee..acc72414f40 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 1fc6ccff898..1a75eaaa833 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 0651e27403d..3220e2e3bc6 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 (void)
{
- 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 (void)
int
be_visitor_facet_ami_exh::gen_facet_executor_class (void)
{
- 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 34ddd42f482..eaf64d4d78c 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 e25c52daa57..00efc021a17 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;
if (be_global->gen_inline_constants () && !forbidden_in_class)
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 7bae6e9a7f1..00dbd55a087 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
@@ -32,8 +32,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 = 0;
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 c8f9a89a2ea..0fbc1b65fd1 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 4717ce4c8d6..49ba1b0a9e9 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 4e269fca772..334d049f575 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
@@ -30,8 +30,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 c08274dc244..268277847e5 100644
--- a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp
@@ -40,8 +40,7 @@ be_visitor_enum_ch::visit_enum (be_enum *node)
// Comma to be generated by the scope visitor.
this->ctx_->comma (1);
- *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 735c673ff54..fecd1a54a11 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 = 0;
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 088ef2615bb..3b82f48df28 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 646b4b3b5ea..8912bd38e24 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 7c18447874c..b32048fbba5 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 b1a89b0904d..c6175ff7897 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 c0e0427d1ba..8dd02e273c0 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 dcee5ccd560..844f837e573 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 c70562afcc6..75e232da4a6 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 f5f4cd4bb34..e971b0a29b3 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 9c8a8d087be..b87e30c6f89 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);
*os << rh_skel_full_scope_name.c_str ()
<< "::" << rh_skel_class_name.c_str () << " (void)" << be_nl
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 51de355c8ff..63b553fec7f 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 2097910dd48..b81ef326983 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 c7c001a671b..ea62633ae7f 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 6f010faf6a4..c9c7a9c7193 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 (void)
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 c3c8e849f63..20d9e9696e6 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 e567aee863d..1e8d9c4391a 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 19ef2555e0e..c97c127ddbe 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 9c37d52049d..cc2dc132b20 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 d9a04a235e5..1f5278e857d 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 3e8f278a6a2..9581fce21e6 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 07ae0b2d891..79f3a5a2c3b 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 d5b0bf8b0fa..53a672d9cfd 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 ecbea914119..bae4343246b 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 eb8ac329352..fb349ba5781 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 7c6f8a65d19..bec228181e5 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 cda960e90ef..c4d1254a0c9 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 7dd0ce2818c..9666082dcd7 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;
@@ -159,8 +158,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;
@@ -366,8 +364,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;
@@ -419,8 +416,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 aad105b595a..de9e135595c 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 58f86811c6e..afe3444e079 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 5bd6a66367d..95fae664a01 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 9c1a935c8fd..b2aae3dd716 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 = 0;
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 20199cf5d0c..1621a53f502 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 85636db20ea..72b968157da 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 = 0;
- *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 126bd313960..46fafeaae82 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 0ef79436a49..638cce03153 100644
--- a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp
@@ -38,10 +38,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 18a6805b3c1..f981f306a19 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_2;
+ TAO_INSERT_COMMENT (os);
*os << "virtual 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 c4efea27089..ba2a3aaa1a2 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 = 0;
// 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 f3a5022521a..2888c52dcea 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_2;
+ 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 9fd0fdbc8d6..93f6260a81e 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 474624f6d01..344af9b5d81 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 7dda3e5b466..a0f6458e5e4 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 f6e027b2ade..f68b4599da6 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 83d86dc542f..de9bf612672 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 18019fe4fd9..cbde2fa7fb0 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 158b03e5ca4..7145fc4d8e7 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 aad01312713..67f7e3af6b5 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 46dadc29d59..c449f9aa123 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 98cb3e6a7e6..990f7538cc1 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 df342b6eb2d..d130b757de8 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 6f7c97458de..b909b551e98 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 44adb8fb6c7..6642e2fe34e 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 (void)
{
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 (void)
size_t index = 0;
be_interface_fwd *ifwd = 0;
- *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 (void)
size_t index = 0;
AST_Interface *i = 0;
- *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 64fee51a744..a810680ec52 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 664ada9f408..495bda7b593 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 a8a4e22d44d..7a504a0fc62 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 a5dd172bc0f..a516db4e12d 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 3dd4a7f06e9..d6c3876e18b 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 e9ae39425eb..9000e7f433b 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 f009869b00c..eafe28cf8db 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 b27043e3911..21d32abdd2f 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
@@ -38,8 +38,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 = 0;
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 a73227ce818..3b9892a40a5 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
@@ -38,9 +38,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 36eaa146bcd..14f91dc8b33 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
@@ -39,8 +39,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 ec8989e87b4..8969d08612e 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 b9cffa5a891..896a4f8f5c1 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 7800264a0dc..e670b3014c9 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 f4001260781..b43b998f218 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 5e8b8b590d0..fc0621241b4 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 9209875fc37..a1ad6a94a68 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 26fb914ad63..0aca5fefee2 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 b07080f85ab..fff6b179e84 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 fa9c70aa9b7..2174c7b5f84 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 0e25abc58b3..e26fefebddd 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 a6c42848bb5..3f074d765d8 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 59af00701bc..4205121db84 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 4fe614a3ad9..13ac66f5b08 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 = 0;
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 cecfe376499..d42c997170d 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 41125edc8cd..8502f1bc85c 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 b45851a5eea..869abbc0110 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;
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 6f354a6592a..e9ff235f3a1 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 f1ac4e6e0f2..9907db2135a 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 d8e04dd7827..7d5e7c9f645 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 a9423333df5..aa28123b0d1 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 fdadd8546de..c08ad027b28 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/private_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp
index 8eed1cecc00..3e350d06f14 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 a9e96e188e9..1ca353cdc03 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 c6d85ab4ea4..520752e0e14 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 78aea71a1dc..b321c7dc49a 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 = 0;
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 73a9d99f761..a48f5875801 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 61198c688a9..bc15e20e9fc 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 96b6b5bbae1..ae5070edf16 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 f3f9358ba5d..356e1d18e57 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 30d21bb3b2a..a240aae9185 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 a0657150fc7..1d5985b4010 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 6d64385f51c..5a960f4ae66 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 0df910222b4..067758873e7 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 9d0ce3dc708..5c36bea5b0f 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 ())
{
@@ -339,8 +338,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 ();
@@ -365,8 +363,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 ();
@@ -482,8 +479,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 ())
{
@@ -636,8 +632,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 ();
@@ -682,8 +677,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 ();
@@ -724,8 +718,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 ();
@@ -761,8 +754,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 77e138be8ab..6178dacbd7e 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 = 0;
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 509937c55fa..99fe595abb7 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 51920f0783d..d2181149307 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 f3106b00fe9..d74a08b9a1f 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 bdd7fdb7cfa..c87b0d94343 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 a33196f905d..43c3e756de1 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 e8a0068182c..d84d7e3feff 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 c37e064e80e..7d8d58d4a02 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 62f092fc062..449a5e17230 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 4984e3448d9..7bc893e7d6b 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 588c4a0204e..06a282b8b34 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 () << " (void)" << 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 122540ac6b8..dbbcd0278e4 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 ())
{
@@ -417,8 +416,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 8c97368f748..ee643886fbb 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 b83e760999a..43700661cd5 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 879f325fb37..1adb806c457 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 (void);" << be_nl;
*os << "virtual void _remove_ref (void);";
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 14f9a18fead..818bdb607d0 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 6f61bfdb30e..edcd3e0187b 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 bbfe3041e28..2c3fa5144b2 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 e6f07f9dc13..6ab9b5a5021 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 = 0;
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 afff31f7271..113b06c3754 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 eca14482979..5afe5cbd37f 100644
--- a/TAO/TAO_IDL/be_include/be_helper.h
+++ b/TAO/TAO_IDL/be_include/be_helper.h
@@ -222,6 +222,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_;