From c61f197baddcd2e048a106a2026c72cadc452bcd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Jun 2012 11:56:54 +0200 Subject: Add ability to specify prologues/epilogues for generated C++ files Also add options to specify text prologues/epilogues in addition to files for generated man and html files. --- cli/generator.cxx | 161 +++++++++++++++++++++++++++--------------- cli/options.cli | 124 +++++++++++++++++++++++++++++++-- cli/options.cxx | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++---- cli/options.hxx | 73 ++++++++++++++++++- cli/options.ixx | 104 ++++++++++++++++++++++++++-- doc/cli.1 | 68 ++++++++++++++++-- doc/cli.xhtml | 68 ++++++++++++++++-- 7 files changed, 706 insertions(+), 96 deletions(-) diff --git a/cli/generator.cxx b/cli/generator.cxx index 8d14bd7..7b3f688 100644 --- a/cli/generator.cxx +++ b/cli/generator.cxx @@ -88,6 +88,23 @@ namespace throw generator::failed (); } } + + void + append (ostream& os, vector const& text, string const& file) + { + for (vector::const_iterator i (text.begin ()); + i != text.end (); ++i) + { + os << *i << endl; + } + + if (!file.empty ()) + { + ifstream ifs; + open (ifs, file); + os << ifs.rdbuf (); + } + } } generator:: @@ -243,7 +260,6 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // HXX // { - cxx_filter filt (hxx); context ctx (hxx, unit, ops); string guard (make_guard (gp + hxx_name, ctx)); @@ -252,10 +268,25 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) << "#define " << guard << endl << endl; - if (runtime) - generate_runtime_header (ctx); + // Copy prologue. + // + hxx << "// Begin prologue." << endl + << "//" << endl; + append (hxx, ops.hxx_prologue (), ops.hxx_prologue_file ()); + hxx << "//" << endl + << "// End prologue." << endl + << endl; + + { + // We don't want to indent prologues/epilogues. + // + cxx_filter filt (ctx.os); - generate_header (ctx); + if (runtime) + generate_runtime_header (ctx); + + generate_header (ctx); + } if (inl) { @@ -264,6 +295,15 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) << endl; } + // Copy epilogue. + // + hxx << "// Begin epilogue." << endl + << "//" << endl; + append (hxx, ops.hxx_epilogue (), ops.hxx_epilogue_file ()); + hxx << "//" << endl + << "// End epilogue." << endl + << endl; + hxx << "#endif // " << guard << endl; } @@ -271,34 +311,79 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // if (inl) { - cxx_filter filt (ixx); context ctx (ixx, unit, ops); - if (runtime) - generate_runtime_inline (ctx); + // Copy prologue. + // + ixx << "// Begin prologue." << endl + << "//" << endl; + append (ixx, ops.ixx_prologue (), ops.ixx_prologue_file ()); + ixx << "//" << endl + << "// End prologue." << endl + << endl; + + { + // We don't want to indent prologues/epilogues. + // + cxx_filter filt (ctx.os); + + if (runtime) + generate_runtime_inline (ctx); + + generate_inline (ctx); + } - generate_inline (ctx); + // Copy epilogue. + // + ixx << "// Begin epilogue." << endl + << "//" << endl; + append (ixx, ops.ixx_epilogue (), ops.ixx_epilogue_file ()); + ixx << "//" << endl + << "// End epilogue." << endl; } // CXX // { - cxx_filter filt (cxx); context ctx (cxx, unit, ops); + // Copy prologue. + // + cxx << "// Begin prologue." << endl + << "//" << endl; + append (cxx, ops.cxx_prologue (), ops.cxx_prologue_file ()); + cxx << "//" << endl + << "// End prologue." << endl + << endl; + cxx << "#include " << (br ? '<' : '"') << ip << hxx_name << (br ? '>' : '"') << endl << endl; - if (runtime && !inl) - generate_runtime_inline (ctx); + { + // We don't want to indent prologues/epilogues. + // + cxx_filter filt (ctx.os); - generate_runtime_source (ctx, runtime); + if (runtime && !inl) + generate_runtime_inline (ctx); - if (!inl) - generate_inline (ctx); + generate_runtime_source (ctx, runtime); + + if (!inl) + generate_inline (ctx); - generate_source (ctx); + generate_source (ctx); + } + + // Copy epilogue. + // + cxx << "// Begin epilogue." << endl + << "//" << endl; + append (cxx, ops.cxx_epilogue (), ops.cxx_epilogue_file ()); + cxx << "//" << endl + << "// End epilogue." << endl + << endl; } } @@ -306,23 +391,6 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // if (gen_man) { - // Prologue & epilogue. - // - ifstream prologue, epilogue; - { - string file (ops.man_prologue_file ()); - - if (!file.empty ()) - open (prologue, file); - } - - { - string file (ops.man_epilogue_file ()); - - if (!file.empty ()) - open (epilogue, file); - } - ofstream man; if (!ops.stdout_ ()) @@ -348,39 +416,20 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // ostream& os (ops.stdout_ () ? cout : static_cast (man)); - if (prologue.is_open ()) - os << prologue.rdbuf (); + append (os, ops.man_prologue (), ops.man_prologue_file ()); os << man_header; context ctx (os, unit, ops); generate_man (ctx); - if (epilogue.is_open ()) - os << epilogue.rdbuf (); + append (os, ops.man_epilogue (), ops.man_epilogue_file ()); } // HTML output // if (gen_html) { - // Prologue & epilogue. - // - ifstream prologue, epilogue; - { - string file (ops.html_prologue_file ()); - - if (!file.empty ()) - open (prologue, file); - } - - { - string file (ops.html_epilogue_file ()); - - if (!file.empty ()) - open (epilogue, file); - } - ofstream html; if (!ops.stdout_ ()) @@ -406,16 +455,14 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // ostream& os (ops.stdout_ () ? cout : static_cast (html)); - if (prologue.is_open ()) - os << prologue.rdbuf (); + append (os, ops.html_prologue (), ops.html_prologue_file ()); os << html_header; context ctx (os, unit, ops); generate_html (ctx); - if (epilogue.is_open ()) - os << epilogue.rdbuf (); + append (os, ops.html_epilogue (), ops.html_epilogue_file ()); } auto_rm.cancel (); diff --git a/cli/options.cli b/cli/options.cli index aef408e..ab7be1c 100644 --- a/cli/options.cli +++ b/cli/options.cli @@ -121,28 +121,140 @@ class options "Generate documentation in the HTML format." }; - std::string --man-prologue-file + // Prologues. + // + std::vector --hxx-prologue + { + "", + "Insert at the beginning of the generated C++ header file." + }; + + std::vector --ixx-prologue + { + "", + "Insert at the beginning of the generated C++ inline file." + }; + + std::vector --cxx-prologue + { + "", + "Insert at the beginning of the generated C++ source file." + }; + + std::vector --man-prologue + { + "", + "Insert at the beginning of the generated man page file." + }; + + std::vector --html-prologue + { + "", + "Insert at the beginning of the generated HTML file." + }; + + // Epilogues. + // + std::vector --hxx-epilogue + { + "", + "Insert at the end of the generated C++ header file." + }; + + std::vector --ixx-epilogue + { + "", + "Insert at the end of the generated C++ inline file." + }; + + std::vector --cxx-epilogue + { + "", + "Insert at the end of the generated C++ source file." + }; + + std::vector --man-epilogue + { + "", + "Insert at the end of the generated man page text." + }; + + std::vector --html-epilogue + { + "", + "Insert at the end of the generated HTML text." + }; + + // Prologue files. + // + std::string --hxx-prologue-file { "", - "Insert the content of at the beginning of the man page file." + "Insert the content of at the beginning of the generated C++ + header file." }; - std::string --man-epilogue-file + std::string --ixx-prologue-file + { + "", + "Insert the content of at the beginning of the generated C++ + inline file." + }; + + std::string --cxx-prologue-file { "", - "Insert the content of at the end of the man page file." + "Insert the content of at the beginning of the generated C++ + source file." + }; + + std::string --man-prologue-file + { + "", + "Insert the content of at the beginning of the generated man + page file." }; std::string --html-prologue-file { "", - "Insert the content of at the beginning of the HTML file." + "Insert the content of at the beginning of the generated HTML + file." + }; + + // Epilogue files. + // + std::string --hxx-epilogue-file + { + "", + "Insert the content of at the end of the generated C++ header + file." + }; + + std::string --ixx-epilogue-file + { + "", + "Insert the content of at the end of the generated C++ inline + file." + }; + + std::string --cxx-epilogue-file + { + "", + "Insert the content of at the end of the generated C++ source + file." + }; + + std::string --man-epilogue-file + { + "", + "Insert the content of at the end of the generated man page file." }; std::string --html-epilogue-file { "", - "Insert the content of at the end of the HTML file." + "Insert the content of at the end of the generated HTML file." }; std::vector --class diff --git a/cli/options.cxx b/cli/options.cxx index 9cd7407..1e94e17 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -568,9 +568,25 @@ options () generate_cxx_ (), generate_man_ (), generate_html_ (), + hxx_prologue_ (), + ixx_prologue_ (), + cxx_prologue_ (), + man_prologue_ (), + html_prologue_ (), + hxx_epilogue_ (), + ixx_epilogue_ (), + cxx_epilogue_ (), + man_epilogue_ (), + html_epilogue_ (), + hxx_prologue_file_ (), + ixx_prologue_file_ (), + cxx_prologue_file_ (), man_prologue_file_ (), - man_epilogue_file_ (), html_prologue_file_ (), + hxx_epilogue_file_ (), + ixx_epilogue_file_ (), + cxx_epilogue_file_ (), + man_epilogue_file_ (), html_epilogue_file_ (), class__ (), stdout__ (), @@ -614,9 +630,25 @@ options (int& argc, generate_cxx_ (), generate_man_ (), generate_html_ (), + hxx_prologue_ (), + ixx_prologue_ (), + cxx_prologue_ (), + man_prologue_ (), + html_prologue_ (), + hxx_epilogue_ (), + ixx_epilogue_ (), + cxx_epilogue_ (), + man_epilogue_ (), + html_epilogue_ (), + hxx_prologue_file_ (), + ixx_prologue_file_ (), + cxx_prologue_file_ (), man_prologue_file_ (), - man_epilogue_file_ (), html_prologue_file_ (), + hxx_epilogue_file_ (), + ixx_epilogue_file_ (), + cxx_epilogue_file_ (), + man_epilogue_file_ (), html_epilogue_file_ (), class__ (), stdout__ (), @@ -663,9 +695,25 @@ options (int start, generate_cxx_ (), generate_man_ (), generate_html_ (), + hxx_prologue_ (), + ixx_prologue_ (), + cxx_prologue_ (), + man_prologue_ (), + html_prologue_ (), + hxx_epilogue_ (), + ixx_epilogue_ (), + cxx_epilogue_ (), + man_epilogue_ (), + html_epilogue_ (), + hxx_prologue_file_ (), + ixx_prologue_file_ (), + cxx_prologue_file_ (), man_prologue_file_ (), - man_epilogue_file_ (), html_prologue_file_ (), + hxx_epilogue_file_ (), + ixx_epilogue_file_ (), + cxx_epilogue_file_ (), + man_epilogue_file_ (), html_epilogue_file_ (), class__ (), stdout__ (), @@ -712,9 +760,25 @@ options (int& argc, generate_cxx_ (), generate_man_ (), generate_html_ (), + hxx_prologue_ (), + ixx_prologue_ (), + cxx_prologue_ (), + man_prologue_ (), + html_prologue_ (), + hxx_epilogue_ (), + ixx_epilogue_ (), + cxx_epilogue_ (), + man_epilogue_ (), + html_epilogue_ (), + hxx_prologue_file_ (), + ixx_prologue_file_ (), + cxx_prologue_file_ (), man_prologue_file_ (), - man_epilogue_file_ (), html_prologue_file_ (), + hxx_epilogue_file_ (), + ixx_epilogue_file_ (), + cxx_epilogue_file_ (), + man_epilogue_file_ (), html_epilogue_file_ (), class__ (), stdout__ (), @@ -763,9 +827,25 @@ options (int start, generate_cxx_ (), generate_man_ (), generate_html_ (), + hxx_prologue_ (), + ixx_prologue_ (), + cxx_prologue_ (), + man_prologue_ (), + html_prologue_ (), + hxx_epilogue_ (), + ixx_epilogue_ (), + cxx_epilogue_ (), + man_epilogue_ (), + html_epilogue_ (), + hxx_prologue_file_ (), + ixx_prologue_file_ (), + cxx_prologue_file_ (), man_prologue_file_ (), - man_epilogue_file_ (), html_prologue_file_ (), + hxx_epilogue_file_ (), + ixx_epilogue_file_ (), + cxx_epilogue_file_ (), + man_epilogue_file_ (), html_epilogue_file_ (), class__ (), stdout__ (), @@ -810,9 +890,25 @@ options (::cli::scanner& s, generate_cxx_ (), generate_man_ (), generate_html_ (), + hxx_prologue_ (), + ixx_prologue_ (), + cxx_prologue_ (), + man_prologue_ (), + html_prologue_ (), + hxx_epilogue_ (), + ixx_epilogue_ (), + cxx_epilogue_ (), + man_epilogue_ (), + html_epilogue_ (), + hxx_prologue_file_ (), + ixx_prologue_file_ (), + cxx_prologue_file_ (), man_prologue_file_ (), - man_epilogue_file_ (), html_prologue_file_ (), + hxx_epilogue_file_ (), + ixx_epilogue_file_ (), + cxx_epilogue_file_ (), + man_epilogue_file_ (), html_epilogue_file_ (), class__ (), stdout__ (), @@ -886,17 +982,65 @@ print_usage (::std::ostream& os) os << "--generate-html Generate documentation in the HTML format." << ::std::endl; - os << "--man-prologue-file Insert the content of at the beginning of" << ::std::endl - << " the man page file." << ::std::endl; + os << "--hxx-prologue Insert at the beginning of the generated" << ::std::endl + << " C++ header file." << ::std::endl; + + os << "--ixx-prologue Insert at the beginning of the generated" << ::std::endl + << " C++ inline file." << ::std::endl; + + os << "--cxx-prologue Insert at the beginning of the generated" << ::std::endl + << " C++ source file." << ::std::endl; + + os << "--man-prologue Insert at the beginning of the generated" << ::std::endl + << " man page file." << ::std::endl; + + os << "--html-prologue Insert at the beginning of the generated" << ::std::endl + << " HTML file." << ::std::endl; - os << "--man-epilogue-file Insert the content of at the end of the man" << ::std::endl - << " page file." << ::std::endl; + os << "--hxx-epilogue Insert at the end of the generated C++" << ::std::endl + << " header file." << ::std::endl; + + os << "--ixx-epilogue Insert at the end of the generated C++" << ::std::endl + << " inline file." << ::std::endl; + + os << "--cxx-epilogue Insert at the end of the generated C++" << ::std::endl + << " source file." << ::std::endl; + + os << "--man-epilogue Insert at the end of the generated man page" << ::std::endl + << " text." << ::std::endl; + + os << "--html-epilogue Insert at the end of the generated HTML" << ::std::endl + << " text." << ::std::endl; + + os << "--hxx-prologue-file Insert the content of at the beginning of" << ::std::endl + << " the generated C++ header file." << ::std::endl; + + os << "--ixx-prologue-file Insert the content of at the beginning of" << ::std::endl + << " the generated C++ inline file." << ::std::endl; + + os << "--cxx-prologue-file Insert the content of at the beginning of" << ::std::endl + << " the generated C++ source file." << ::std::endl; + + os << "--man-prologue-file Insert the content of at the beginning of" << ::std::endl + << " the generated man page file." << ::std::endl; os << "--html-prologue-file Insert the content of at the beginning of" << ::std::endl - << " the HTML file." << ::std::endl; + << " the generated HTML file." << ::std::endl; + + os << "--hxx-epilogue-file Insert the content of at the end of the" << ::std::endl + << " generated C++ header file." << ::std::endl; + + os << "--ixx-epilogue-file Insert the content of at the end of the" << ::std::endl + << " generated C++ inline file." << ::std::endl; + + os << "--cxx-epilogue-file Insert the content of at the end of the" << ::std::endl + << " generated C++ source file." << ::std::endl; + + os << "--man-epilogue-file Insert the content of at the end of the" << ::std::endl + << " generated man page file." << ::std::endl; os << "--html-epilogue-file Insert the content of at the end of the" << ::std::endl - << " HTML file." << ::std::endl; + << " generated HTML file." << ::std::endl; os << "--class Generate the man page or HTML documentation only" << ::std::endl << " for the options class." << ::std::endl; @@ -994,12 +1138,44 @@ struct _cli_options_map_init &::cli::thunk< options, bool, &options::generate_man_ >; _cli_options_map_["--generate-html"] = &::cli::thunk< options, bool, &options::generate_html_ >; + _cli_options_map_["--hxx-prologue"] = + &::cli::thunk< options, std::vector, &options::hxx_prologue_ >; + _cli_options_map_["--ixx-prologue"] = + &::cli::thunk< options, std::vector, &options::ixx_prologue_ >; + _cli_options_map_["--cxx-prologue"] = + &::cli::thunk< options, std::vector, &options::cxx_prologue_ >; + _cli_options_map_["--man-prologue"] = + &::cli::thunk< options, std::vector, &options::man_prologue_ >; + _cli_options_map_["--html-prologue"] = + &::cli::thunk< options, std::vector, &options::html_prologue_ >; + _cli_options_map_["--hxx-epilogue"] = + &::cli::thunk< options, std::vector, &options::hxx_epilogue_ >; + _cli_options_map_["--ixx-epilogue"] = + &::cli::thunk< options, std::vector, &options::ixx_epilogue_ >; + _cli_options_map_["--cxx-epilogue"] = + &::cli::thunk< options, std::vector, &options::cxx_epilogue_ >; + _cli_options_map_["--man-epilogue"] = + &::cli::thunk< options, std::vector, &options::man_epilogue_ >; + _cli_options_map_["--html-epilogue"] = + &::cli::thunk< options, std::vector, &options::html_epilogue_ >; + _cli_options_map_["--hxx-prologue-file"] = + &::cli::thunk< options, std::string, &options::hxx_prologue_file_ >; + _cli_options_map_["--ixx-prologue-file"] = + &::cli::thunk< options, std::string, &options::ixx_prologue_file_ >; + _cli_options_map_["--cxx-prologue-file"] = + &::cli::thunk< options, std::string, &options::cxx_prologue_file_ >; _cli_options_map_["--man-prologue-file"] = &::cli::thunk< options, std::string, &options::man_prologue_file_ >; - _cli_options_map_["--man-epilogue-file"] = - &::cli::thunk< options, std::string, &options::man_epilogue_file_ >; _cli_options_map_["--html-prologue-file"] = &::cli::thunk< options, std::string, &options::html_prologue_file_ >; + _cli_options_map_["--hxx-epilogue-file"] = + &::cli::thunk< options, std::string, &options::hxx_epilogue_file_ >; + _cli_options_map_["--ixx-epilogue-file"] = + &::cli::thunk< options, std::string, &options::ixx_epilogue_file_ >; + _cli_options_map_["--cxx-epilogue-file"] = + &::cli::thunk< options, std::string, &options::cxx_epilogue_file_ >; + _cli_options_map_["--man-epilogue-file"] = + &::cli::thunk< options, std::string, &options::man_epilogue_file_ >; _cli_options_map_["--html-epilogue-file"] = &::cli::thunk< options, std::string, &options::html_epilogue_file_ >; _cli_options_map_["--class"] = diff --git a/cli/options.hxx b/cli/options.hxx index c513e03..d3a9c5c 100644 --- a/cli/options.hxx +++ b/cli/options.hxx @@ -303,6 +303,9 @@ namespace cli std::deque args_; bool skip_; }; + + template + struct parser; } #include @@ -407,16 +410,64 @@ class options const bool& generate_html () const; + const std::vector& + hxx_prologue () const; + + const std::vector& + ixx_prologue () const; + + const std::vector& + cxx_prologue () const; + + const std::vector& + man_prologue () const; + + const std::vector& + html_prologue () const; + + const std::vector& + hxx_epilogue () const; + + const std::vector& + ixx_epilogue () const; + + const std::vector& + cxx_epilogue () const; + + const std::vector& + man_epilogue () const; + + const std::vector& + html_epilogue () const; + const std::string& - man_prologue_file () const; + hxx_prologue_file () const; const std::string& - man_epilogue_file () const; + ixx_prologue_file () const; + + const std::string& + cxx_prologue_file () const; + + const std::string& + man_prologue_file () const; const std::string& html_prologue_file () const; const std::string& + hxx_epilogue_file () const; + + const std::string& + ixx_epilogue_file () const; + + const std::string& + cxx_epilogue_file () const; + + const std::string& + man_epilogue_file () const; + + const std::string& html_epilogue_file () const; const std::vector& @@ -500,9 +551,25 @@ class options bool generate_cxx_; bool generate_man_; bool generate_html_; + std::vector hxx_prologue_; + std::vector ixx_prologue_; + std::vector cxx_prologue_; + std::vector man_prologue_; + std::vector html_prologue_; + std::vector hxx_epilogue_; + std::vector ixx_epilogue_; + std::vector cxx_epilogue_; + std::vector man_epilogue_; + std::vector html_epilogue_; + std::string hxx_prologue_file_; + std::string ixx_prologue_file_; + std::string cxx_prologue_file_; std::string man_prologue_file_; - std::string man_epilogue_file_; std::string html_prologue_file_; + std::string hxx_epilogue_file_; + std::string ixx_epilogue_file_; + std::string cxx_epilogue_file_; + std::string man_epilogue_file_; std::string html_epilogue_file_; std::vector class__; bool stdout__; diff --git a/cli/options.ixx b/cli/options.ixx index e095b95..a361898 100644 --- a/cli/options.ixx +++ b/cli/options.ixx @@ -310,16 +310,88 @@ generate_html () const return this->generate_html_; } +inline const std::vector& options:: +hxx_prologue () const +{ + return this->hxx_prologue_; +} + +inline const std::vector& options:: +ixx_prologue () const +{ + return this->ixx_prologue_; +} + +inline const std::vector& options:: +cxx_prologue () const +{ + return this->cxx_prologue_; +} + +inline const std::vector& options:: +man_prologue () const +{ + return this->man_prologue_; +} + +inline const std::vector& options:: +html_prologue () const +{ + return this->html_prologue_; +} + +inline const std::vector& options:: +hxx_epilogue () const +{ + return this->hxx_epilogue_; +} + +inline const std::vector& options:: +ixx_epilogue () const +{ + return this->ixx_epilogue_; +} + +inline const std::vector& options:: +cxx_epilogue () const +{ + return this->cxx_epilogue_; +} + +inline const std::vector& options:: +man_epilogue () const +{ + return this->man_epilogue_; +} + +inline const std::vector& options:: +html_epilogue () const +{ + return this->html_epilogue_; +} + inline const std::string& options:: -man_prologue_file () const +hxx_prologue_file () const { - return this->man_prologue_file_; + return this->hxx_prologue_file_; } inline const std::string& options:: -man_epilogue_file () const +ixx_prologue_file () const { - return this->man_epilogue_file_; + return this->ixx_prologue_file_; +} + +inline const std::string& options:: +cxx_prologue_file () const +{ + return this->cxx_prologue_file_; +} + +inline const std::string& options:: +man_prologue_file () const +{ + return this->man_prologue_file_; } inline const std::string& options:: @@ -329,6 +401,30 @@ html_prologue_file () const } inline const std::string& options:: +hxx_epilogue_file () const +{ + return this->hxx_epilogue_file_; +} + +inline const std::string& options:: +ixx_epilogue_file () const +{ + return this->ixx_epilogue_file_; +} + +inline const std::string& options:: +cxx_epilogue_file () const +{ + return this->cxx_epilogue_file_; +} + +inline const std::string& options:: +man_epilogue_file () const +{ + return this->man_epilogue_file_; +} + +inline const std::string& options:: html_epilogue_file () const { return this->html_epilogue_file_; diff --git a/doc/cli.1 b/doc/cli.1 index 76bbfeb..963ab43 100644 --- a/doc/cli.1 +++ b/doc/cli.1 @@ -131,17 +131,73 @@ Generate documentation in the man page format\. .IP "\fB--generate-html\fP" Generate documentation in the HTML format\. -.IP "\fB--man-prologue-file\fP \fIfile\fP" -Insert the content of \fIfile\fP at the beginning of the man page file\. +.IP "\fB--hxx-prologue\fP \fItext\fP" +Insert \fItext\fP at the beginning of the generated C++ header file\. -.IP "\fB--man-epilogue-file\fP \fIfile\fP" -Insert the content of \fIfile\fP at the end of the man page file\. +.IP "\fB--ixx-prologue\fP \fItext\fP" +Insert \fItext\fP at the beginning of the generated C++ inline file\. + +.IP "\fB--cxx-prologue\fP \fItext\fP" +Insert \fItext\fP at the beginning of the generated C++ source file\. + +.IP "\fB--man-prologue\fP \fItext\fP" +Insert \fItext\fP at the beginning of the generated man page file\. + +.IP "\fB--html-prologue\fP \fItext\fP" +Insert \fItext\fP at the beginning of the generated HTML file\. + +.IP "\fB--hxx-epilogue\fP \fItext\fP" +Insert \fItext\fP at the end of the generated C++ header file\. + +.IP "\fB--ixx-epilogue\fP \fItext\fP" +Insert \fItext\fP at the end of the generated C++ inline file\. + +.IP "\fB--cxx-epilogue\fP \fItext\fP" +Insert \fItext\fP at the end of the generated C++ source file\. + +.IP "\fB--man-epilogue\fP \fItext\fP" +Insert \fItext\fP at the end of the generated man page text\. + +.IP "\fB--html-epilogue\fP \fItext\fP" +Insert \fItext\fP at the end of the generated HTML text\. + +.IP "\fB--hxx-prologue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the beginning of the generated C++ +header file\. + +.IP "\fB--ixx-prologue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the beginning of the generated C++ +inline file\. + +.IP "\fB--cxx-prologue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the beginning of the generated C++ +source file\. + +.IP "\fB--man-prologue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the beginning of the generated man page +file\. .IP "\fB--html-prologue-file\fP \fIfile\fP" -Insert the content of \fIfile\fP at the beginning of the HTML file\. +Insert the content of \fIfile\fP at the beginning of the generated HTML +file\. + +.IP "\fB--hxx-epilogue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the end of the generated C++ header +file\. + +.IP "\fB--ixx-epilogue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the end of the generated C++ inline +file\. + +.IP "\fB--cxx-epilogue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the end of the generated C++ source +file\. + +.IP "\fB--man-epilogue-file\fP \fIfile\fP" +Insert the content of \fIfile\fP at the end of the generated man page file\. .IP "\fB--html-epilogue-file\fP \fIfile\fP" -Insert the content of \fIfile\fP at the end of the HTML file\. +Insert the content of \fIfile\fP at the end of the generated HTML file\. .IP "\fB--class\fP \fIfq-name\fP" Generate the man page or HTML documentation only for the \fIfq-name\fP diff --git a/doc/cli.xhtml b/doc/cli.xhtml index bcd6959..3206c5e 100644 --- a/doc/cli.xhtml +++ b/doc/cli.xhtml @@ -156,17 +156,73 @@
--generate-html
Generate documentation in the HTML format.
-
--man-prologue-file file
-
Insert the content of file at the beginning of the man page file.
+
--hxx-prologue text
+
Insert text at the beginning of the generated C++ header file.
-
--man-epilogue-file file
-
Insert the content of file at the end of the man page file.
+
--ixx-prologue text
+
Insert text at the beginning of the generated C++ inline file.
+ +
--cxx-prologue text
+
Insert text at the beginning of the generated C++ source file.
+ +
--man-prologue text
+
Insert text at the beginning of the generated man page file.
+ +
--html-prologue text
+
Insert text at the beginning of the generated HTML file.
+ +
--hxx-epilogue text
+
Insert text at the end of the generated C++ header file.
+ +
--ixx-epilogue text
+
Insert text at the end of the generated C++ inline file.
+ +
--cxx-epilogue text
+
Insert text at the end of the generated C++ source file.
+ +
--man-epilogue text
+
Insert text at the end of the generated man page text.
+ +
--html-epilogue text
+
Insert text at the end of the generated HTML text.
+ +
--hxx-prologue-file file
+
Insert the content of file at the beginning of the generated C++ + header file.
+ +
--ixx-prologue-file file
+
Insert the content of file at the beginning of the generated C++ + inline file.
+ +
--cxx-prologue-file file
+
Insert the content of file at the beginning of the generated C++ + source file.
+ +
--man-prologue-file file
+
Insert the content of file at the beginning of the generated man page + file.
--html-prologue-file file
-
Insert the content of file at the beginning of the HTML file.
+
Insert the content of file at the beginning of the generated HTML + file.
+ +
--hxx-epilogue-file file
+
Insert the content of file at the end of the generated C++ header + file.
+ +
--ixx-epilogue-file file
+
Insert the content of file at the end of the generated C++ inline + file.
+ +
--cxx-epilogue-file file
+
Insert the content of file at the end of the generated C++ source + file.
+ +
--man-epilogue-file file
+
Insert the content of file at the end of the generated man page file.
--html-epilogue-file file
-
Insert the content of file at the end of the HTML file.
+
Insert the content of file at the end of the generated HTML file.
--class fq-name
Generate the man page or HTML documentation only for the fq-name -- cgit v1.1