Skip to content

Generate comment with the name of the input IDL file #1925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions TAO/TAO_IDL/be/be_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ TAO_CodeGen::start_client_header (const char *fname)
return -1;
}

gen_generated_from_comment (this->client_header_);
TAO_INSERT_COMMENT (this->client_header_);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -369,6 +370,7 @@ TAO_CodeGen::start_client_stubs (const char *fname)
return -1;
}

gen_generated_from_comment (this->client_stubs_);
TAO_INSERT_COMMENT (this->client_stubs_);

this->gen_stub_src_includes ();
Expand Down Expand Up @@ -451,6 +453,7 @@ TAO_CodeGen::start_server_header (const char *fname)
return -1;
}

gen_generated_from_comment (this->server_header_);
TAO_INSERT_COMMENT (this->server_header_);

// Generate the ident string, if any.
Expand Down Expand Up @@ -577,6 +580,7 @@ TAO_CodeGen::start_server_template_header (const char *fname)
return -1;
}

gen_generated_from_comment (this->server_template_header_);
TAO_INSERT_COMMENT (this->server_template_header_);

// Generate the ident string, if any.
Expand Down Expand Up @@ -628,6 +632,7 @@ TAO_CodeGen::start_server_skeletons (const char *fname)
return -1;
}

gen_generated_from_comment (this->server_skeletons_);
TAO_INSERT_COMMENT (this->server_skeletons_);

// Generate the ident string, if any.
Expand Down Expand Up @@ -688,6 +693,7 @@ TAO_CodeGen::start_server_template_skeletons (const char *fname)
return -1;
}

gen_generated_from_comment (this->server_template_skeletons_);
TAO_INSERT_COMMENT (this->server_template_skeletons_);

// Generate the ident string, if any.
Expand Down Expand Up @@ -764,6 +770,7 @@ TAO_CodeGen::start_anyop_header (const char *fname)
return 0;
}

gen_generated_from_comment (this->anyop_header_);
TAO_INSERT_COMMENT (this->anyop_header_);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -996,6 +1003,7 @@ TAO_CodeGen::start_ciao_svnt_header (const char *fname)

TAO_OutStream &os = *this->ciao_svnt_header_;

gen_generated_from_comment (&os);
TAO_INSERT_COMMENT (&os);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -1096,6 +1104,7 @@ TAO_CodeGen::start_ciao_svnt_source (const char *fname)

TAO_OutStream &os = *this->ciao_svnt_source_;

gen_generated_from_comment (&os);
TAO_INSERT_COMMENT (&os);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -1136,6 +1145,7 @@ TAO_CodeGen::start_ciao_svnt_template_header (const char *fname)

TAO_OutStream &os = *this->ciao_svnt_template_header_;

gen_generated_from_comment (&os);
TAO_INSERT_COMMENT (&os);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -1215,6 +1225,7 @@ TAO_CodeGen::start_ciao_svnt_template_source (const char *fname)

TAO_OutStream &os = *this->ciao_svnt_template_source_;

gen_generated_from_comment (&os);
TAO_INSERT_COMMENT (&os);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -1419,6 +1430,7 @@ TAO_CodeGen::start_ciao_conn_header (const char *fname)

TAO_OutStream &os = *this->ciao_conn_header_;

gen_generated_from_comment (&os);
TAO_INSERT_COMMENT (&os);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -1488,6 +1500,7 @@ TAO_CodeGen::start_ciao_conn_source (const char *fname)

TAO_OutStream &os = *this->ciao_conn_source_;

gen_generated_from_comment (&os);
TAO_INSERT_COMMENT (&os);

// Generate the #ident string, if any.
Expand Down Expand Up @@ -1564,6 +1577,7 @@ TAO_CodeGen::start_implementation_header (const char *fname)
return -1;
}

gen_generated_from_comment (this->implementation_header_);
TAO_INSERT_COMMENT (this->implementation_header_);

// Generate the ident string, if any.
Expand Down Expand Up @@ -1618,6 +1632,7 @@ TAO_CodeGen::start_implementation_skeleton (const char *fname)
return -1;
}

gen_generated_from_comment (this->implementation_skeleton_);
TAO_INSERT_COMMENT (this->implementation_skeleton_);

// Generate the ident string, if any.
Expand Down Expand Up @@ -3814,3 +3829,9 @@ TAO_CodeGen::destroy ()
delete this->gperf_input_stream_;
delete [] this->gperf_input_filename_;
}

void
TAO_CodeGen::gen_generated_from_comment (TAO_OutStream *stream)
{
*stream << "// Generated from: " << idl_global->filename ()->get_string () << "\n";
}
2 changes: 2 additions & 0 deletions TAO/TAO_IDL/be_include/be_codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ class TAO_IDL_BE_Export TAO_CodeGen
const char *included_file,
bool add_comment = false);

void gen_generated_from_comment (TAO_OutStream *stream);

/// Cleanup.
void destroy ();

Expand Down