From 07eb1add3c500ca4c53d499340bf5d524e288b39 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Jun 2012 10:11:01 +0200 Subject: Rename --*logue options to --*logue-file --- cli/generator.cxx | 8 ++--- cli/options.cli | 8 ++--- cli/options.cxx | 100 +++++++++++++++++++++++++++--------------------------- cli/options.hxx | 36 ++++++++++---------- cli/options.ixx | 20 +++++------ 5 files changed, 86 insertions(+), 86 deletions(-) (limited to 'cli') diff --git a/cli/generator.cxx b/cli/generator.cxx index 1ebde25..8d14bd7 100644 --- a/cli/generator.cxx +++ b/cli/generator.cxx @@ -310,14 +310,14 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // ifstream prologue, epilogue; { - string file (ops.man_prologue ()); + string file (ops.man_prologue_file ()); if (!file.empty ()) open (prologue, file); } { - string file (ops.man_epilogue ()); + string file (ops.man_epilogue_file ()); if (!file.empty ()) open (epilogue, file); @@ -368,14 +368,14 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // ifstream prologue, epilogue; { - string file (ops.html_prologue ()); + string file (ops.html_prologue_file ()); if (!file.empty ()) open (prologue, file); } { - string file (ops.html_epilogue ()); + string file (ops.html_epilogue_file ()); if (!file.empty ()) open (epilogue, file); diff --git a/cli/options.cli b/cli/options.cli index fe48219..aef408e 100644 --- a/cli/options.cli +++ b/cli/options.cli @@ -121,25 +121,25 @@ class options "Generate documentation in the HTML format." }; - std::string --man-prologue + std::string --man-prologue-file { "", "Insert the content of at the beginning of the man page file." }; - std::string --man-epilogue + std::string --man-epilogue-file { "", "Insert the content of at the end of the man page file." }; - std::string --html-prologue + std::string --html-prologue-file { "", "Insert the content of at the beginning of the HTML file." }; - std::string --html-epilogue + std::string --html-epilogue-file { "", "Insert the content of at the end of the HTML file." diff --git a/cli/options.cxx b/cli/options.cxx index 0b79417..9cd7407 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -23,9 +23,9 @@ namespace cli } void unknown_option:: - print (std::ostream& os) const + print (::std::ostream& os) const { - os << "unknown option '" << option () << "'"; + os << "unknown option '" << option ().c_str () << "'"; } const char* unknown_option:: @@ -42,9 +42,9 @@ namespace cli } void unknown_argument:: - print (std::ostream& os) const + print (::std::ostream& os) const { - os << "unknown argument '" << argument () << "'"; + os << "unknown argument '" << argument ().c_str () << "'"; } const char* unknown_argument:: @@ -61,9 +61,9 @@ namespace cli } void missing_value:: - print (std::ostream& os) const + print (::std::ostream& os) const { - os << "missing value for option '" << option () << "'"; + os << "missing value for option '" << option ().c_str () << "'"; } const char* missing_value:: @@ -80,10 +80,10 @@ namespace cli } void invalid_value:: - print (std::ostream& os) const + print (::std::ostream& os) const { - os << "invalid value '" << value () << "' for option '" - << option () << "'"; + os << "invalid value '" << value ().c_str () << "' for option '" + << option ().c_str () << "'"; } const char* invalid_value:: @@ -95,7 +95,7 @@ namespace cli // eos_reached // void eos_reached:: - print (std::ostream& os) const + print (::std::ostream& os) const { os << what (); } @@ -114,9 +114,9 @@ namespace cli } void file_io_failure:: - print (std::ostream& os) const + print (::std::ostream& os) const { - os << "unable to open file '" << file () << "' or read failure"; + os << "unable to open file '" << file ().c_str () << "' or read failure"; } const char* file_io_failure:: @@ -133,9 +133,9 @@ namespace cli } void unmatched_quote:: - print (std::ostream& os) const + print (::std::ostream& os) const { - os << "unmatched quote in argument '" << argument () << "'"; + os << "unmatched quote in argument '" << argument ().c_str () << "'"; } const char* unmatched_quote:: @@ -568,10 +568,10 @@ options () generate_cxx_ (), generate_man_ (), generate_html_ (), - man_prologue_ (), - man_epilogue_ (), - html_prologue_ (), - html_epilogue_ (), + man_prologue_file_ (), + man_epilogue_file_ (), + html_prologue_file_ (), + html_epilogue_file_ (), class__ (), stdout__ (), hxx_suffix_ (".hxx"), @@ -614,10 +614,10 @@ options (int& argc, generate_cxx_ (), generate_man_ (), generate_html_ (), - man_prologue_ (), - man_epilogue_ (), - html_prologue_ (), - html_epilogue_ (), + man_prologue_file_ (), + man_epilogue_file_ (), + html_prologue_file_ (), + html_epilogue_file_ (), class__ (), stdout__ (), hxx_suffix_ (".hxx"), @@ -663,10 +663,10 @@ options (int start, generate_cxx_ (), generate_man_ (), generate_html_ (), - man_prologue_ (), - man_epilogue_ (), - html_prologue_ (), - html_epilogue_ (), + man_prologue_file_ (), + man_epilogue_file_ (), + html_prologue_file_ (), + html_epilogue_file_ (), class__ (), stdout__ (), hxx_suffix_ (".hxx"), @@ -712,10 +712,10 @@ options (int& argc, generate_cxx_ (), generate_man_ (), generate_html_ (), - man_prologue_ (), - man_epilogue_ (), - html_prologue_ (), - html_epilogue_ (), + man_prologue_file_ (), + man_epilogue_file_ (), + html_prologue_file_ (), + html_epilogue_file_ (), class__ (), stdout__ (), hxx_suffix_ (".hxx"), @@ -763,10 +763,10 @@ options (int start, generate_cxx_ (), generate_man_ (), generate_html_ (), - man_prologue_ (), - man_epilogue_ (), - html_prologue_ (), - html_epilogue_ (), + man_prologue_file_ (), + man_epilogue_file_ (), + html_prologue_file_ (), + html_epilogue_file_ (), class__ (), stdout__ (), hxx_suffix_ (".hxx"), @@ -810,10 +810,10 @@ options (::cli::scanner& s, generate_cxx_ (), generate_man_ (), generate_html_ (), - man_prologue_ (), - man_epilogue_ (), - html_prologue_ (), - html_epilogue_ (), + man_prologue_file_ (), + man_epilogue_file_ (), + html_prologue_file_ (), + html_epilogue_file_ (), class__ (), stdout__ (), hxx_suffix_ (".hxx"), @@ -886,16 +886,16 @@ print_usage (::std::ostream& os) os << "--generate-html Generate documentation in the HTML format." << ::std::endl; - os << "--man-prologue Insert the content of at the beginning of" << ::std::endl + os << "--man-prologue-file Insert the content of at the beginning of" << ::std::endl << " the man page file." << ::std::endl; - os << "--man-epilogue Insert the content of at the end of the man" << ::std::endl + os << "--man-epilogue-file Insert the content of at the end of the man" << ::std::endl << " page file." << ::std::endl; - os << "--html-prologue Insert the content of at the beginning of" << ::std::endl + os << "--html-prologue-file Insert the content of at the beginning of" << ::std::endl << " the HTML file." << ::std::endl; - os << "--html-epilogue Insert the content of at the end of the" << ::std::endl + os << "--html-epilogue-file Insert the content of at the end of the" << ::std::endl << " HTML file." << ::std::endl; os << "--class Generate the man page or HTML documentation only" << ::std::endl @@ -994,14 +994,14 @@ 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_["--man-prologue"] = - &::cli::thunk< options, std::string, &options::man_prologue_ >; - _cli_options_map_["--man-epilogue"] = - &::cli::thunk< options, std::string, &options::man_epilogue_ >; - _cli_options_map_["--html-prologue"] = - &::cli::thunk< options, std::string, &options::html_prologue_ >; - _cli_options_map_["--html-epilogue"] = - &::cli::thunk< options, std::string, &options::html_epilogue_ >; + _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_["--html-epilogue-file"] = + &::cli::thunk< options, std::string, &options::html_epilogue_file_ >; _cli_options_map_["--class"] = &::cli::thunk< options, std::vector, &options::class__ >; _cli_options_map_["--stdout"] = diff --git a/cli/options.hxx b/cli/options.hxx index 64c52e7..c513e03 100644 --- a/cli/options.hxx +++ b/cli/options.hxx @@ -41,11 +41,11 @@ namespace cli { public: virtual void - print (std::ostream&) const = 0; + print (::std::ostream&) const = 0; }; - std::ostream& - operator<< (std::ostream&, const exception&); + ::std::ostream& + operator<< (::std::ostream&, const exception&); class unknown_option: public exception { @@ -59,7 +59,7 @@ namespace cli option () const; virtual void - print (std::ostream&) const; + print (::std::ostream&) const; virtual const char* what () const throw (); @@ -80,7 +80,7 @@ namespace cli argument () const; virtual void - print (std::ostream&) const; + print (::std::ostream&) const; virtual const char* what () const throw (); @@ -101,7 +101,7 @@ namespace cli option () const; virtual void - print (std::ostream&) const; + print (::std::ostream&) const; virtual const char* what () const throw (); @@ -126,7 +126,7 @@ namespace cli value () const; virtual void - print (std::ostream&) const; + print (::std::ostream&) const; virtual const char* what () const throw (); @@ -140,7 +140,7 @@ namespace cli { public: virtual void - print (std::ostream&) const; + print (::std::ostream&) const; virtual const char* what () const throw (); @@ -158,7 +158,7 @@ namespace cli file () const; virtual void - print (std::ostream&) const; + print (::std::ostream&) const; virtual const char* what () const throw (); @@ -179,7 +179,7 @@ namespace cli argument () const; virtual void - print (std::ostream&) const; + print (::std::ostream&) const; virtual const char* what () const throw (); @@ -408,16 +408,16 @@ class options generate_html () const; const std::string& - man_prologue () const; + man_prologue_file () const; const std::string& - man_epilogue () const; + man_epilogue_file () const; const std::string& - html_prologue () const; + html_prologue_file () const; const std::string& - html_epilogue () const; + html_epilogue_file () const; const std::vector& class_ () const; @@ -500,10 +500,10 @@ class options bool generate_cxx_; bool generate_man_; bool generate_html_; - std::string man_prologue_; - std::string man_epilogue_; - std::string html_prologue_; - std::string html_epilogue_; + std::string man_prologue_file_; + std::string man_epilogue_file_; + std::string html_prologue_file_; + std::string html_epilogue_file_; std::vector class__; bool stdout__; std::string hxx_suffix_; diff --git a/cli/options.ixx b/cli/options.ixx index 1b56750..e095b95 100644 --- a/cli/options.ixx +++ b/cli/options.ixx @@ -14,8 +14,8 @@ namespace cli // exception // - inline std::ostream& - operator<< (std::ostream& os, const exception& e) + inline ::std::ostream& + operator<< (::std::ostream& os, const exception& e) { e.print (os); return os; @@ -311,27 +311,27 @@ generate_html () const } inline const std::string& options:: -man_prologue () const +man_prologue_file () const { - return this->man_prologue_; + return this->man_prologue_file_; } inline const std::string& options:: -man_epilogue () const +man_epilogue_file () const { - return this->man_epilogue_; + return this->man_epilogue_file_; } inline const std::string& options:: -html_prologue () const +html_prologue_file () const { - return this->html_prologue_; + return this->html_prologue_file_; } inline const std::string& options:: -html_epilogue () const +html_epilogue_file () const { - return this->html_epilogue_; + return this->html_epilogue_file_; } inline const std::vector& options:: -- cgit v1.1