From 2181ec73117f2e18cc622ead6256c8104b631214 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 6 Jun 2020 22:42:16 +0300 Subject: Use ad hoc recipe for parsing code and documentation generating The overall approach is to store pre-generated bootstrap options.?xx and cli.{1,xhtml} and automatically update them in the development build (config.cli.develop=true). See README.md in the root of the repository for details. --- cli/cli/.gitignore | 6 +- cli/cli/bootstrap/cli/options.cxx | 2201 ++++++++++++++++++++++++++++++++++ cli/cli/bootstrap/cli/options.hxx | 1673 ++++++++++++++++++++++++++ cli/cli/bootstrap/cli/options.ixx | 2352 +++++++++++++++++++++++++++++++++++++ cli/cli/buildfile | 136 ++- cli/cli/cli.cxx | 8 +- cli/cli/options.cxx | 2168 ---------------------------------- cli/cli/options.hxx | 1641 -------------------------- cli/cli/options.ixx | 2331 ------------------------------------ 9 files changed, 6333 insertions(+), 6183 deletions(-) create mode 100644 cli/cli/bootstrap/cli/options.cxx create mode 100644 cli/cli/bootstrap/cli/options.hxx create mode 100644 cli/cli/bootstrap/cli/options.ixx delete mode 100644 cli/cli/options.cxx delete mode 100644 cli/cli/options.hxx delete mode 100644 cli/cli/options.ixx (limited to 'cli/cli') diff --git a/cli/cli/.gitignore b/cli/cli/.gitignore index 903d015..79562f1 100644 --- a/cli/cli/.gitignore +++ b/cli/cli/.gitignore @@ -1,5 +1,7 @@ -cli -version.hxx +/cli +/bootstrap/cli/cli +/version.hxx +/options.?xx # Unit test executables and Testscript output directories (can be symlinks). # diff --git a/cli/cli/bootstrap/cli/options.cxx b/cli/cli/bootstrap/cli/options.cxx new file mode 100644 index 0000000..56dd24f --- /dev/null +++ b/cli/cli/bootstrap/cli/options.cxx @@ -0,0 +1,2201 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +// Begin prologue. +// +// +// End prologue. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace cli +{ + // unknown_option + // + unknown_option:: + ~unknown_option () throw () + { + } + + void unknown_option:: + print (::std::ostream& os) const + { + os << "unknown option '" << option ().c_str () << "'"; + } + + const char* unknown_option:: + what () const throw () + { + return "unknown option"; + } + + // unknown_argument + // + unknown_argument:: + ~unknown_argument () throw () + { + } + + void unknown_argument:: + print (::std::ostream& os) const + { + os << "unknown argument '" << argument ().c_str () << "'"; + } + + const char* unknown_argument:: + what () const throw () + { + return "unknown argument"; + } + + // missing_value + // + missing_value:: + ~missing_value () throw () + { + } + + void missing_value:: + print (::std::ostream& os) const + { + os << "missing value for option '" << option ().c_str () << "'"; + } + + const char* missing_value:: + what () const throw () + { + return "missing option value"; + } + + // invalid_value + // + invalid_value:: + ~invalid_value () throw () + { + } + + void invalid_value:: + print (::std::ostream& os) const + { + os << "invalid value '" << value ().c_str () << "' for option '" + << option ().c_str () << "'"; + + if (!message ().empty ()) + os << ": " << message ().c_str (); + } + + const char* invalid_value:: + what () const throw () + { + return "invalid option value"; + } + + // eos_reached + // + void eos_reached:: + print (::std::ostream& os) const + { + os << what (); + } + + const char* eos_reached:: + what () const throw () + { + return "end of argument stream reached"; + } + + // file_io_failure + // + file_io_failure:: + ~file_io_failure () throw () + { + } + + void file_io_failure:: + print (::std::ostream& os) const + { + os << "unable to open file '" << file ().c_str () << "' or read failure"; + } + + const char* file_io_failure:: + what () const throw () + { + return "unable to open file or read failure"; + } + + // unmatched_quote + // + unmatched_quote:: + ~unmatched_quote () throw () + { + } + + void unmatched_quote:: + print (::std::ostream& os) const + { + os << "unmatched quote in argument '" << argument ().c_str () << "'"; + } + + const char* unmatched_quote:: + what () const throw () + { + return "unmatched quote"; + } + + // scanner + // + scanner:: + ~scanner () + { + } + + // argv_scanner + // + bool argv_scanner:: + more () + { + return i_ < argc_; + } + + const char* argv_scanner:: + peek () + { + if (i_ < argc_) + return argv_[i_]; + else + throw eos_reached (); + } + + const char* argv_scanner:: + next () + { + if (i_ < argc_) + { + const char* r (argv_[i_]); + + if (erase_) + { + for (int i (i_ + 1); i < argc_; ++i) + argv_[i - 1] = argv_[i]; + + --argc_; + argv_[argc_] = 0; + } + else + ++i_; + + ++start_position_; + return r; + } + else + throw eos_reached (); + } + + void argv_scanner:: + skip () + { + if (i_ < argc_) + { + ++i_; + ++start_position_; + } + else + throw eos_reached (); + } + + std::size_t argv_scanner:: + position () + { + return start_position_; + } + + // argv_file_scanner + // + int argv_file_scanner::zero_argc_ = 0; + std::string argv_file_scanner::empty_string_; + + bool argv_file_scanner:: + more () + { + if (!args_.empty ()) + return true; + + while (base::more ()) + { + // See if the next argument is the file option. + // + const char* a (base::peek ()); + const option_info* oi = 0; + const char* ov = 0; + + if (!skip_) + { + if ((oi = find (a)) != 0) + { + base::next (); + + if (!base::more ()) + throw missing_value (a); + + ov = base::next (); + } + else if (std::strncmp (a, "-", 1) == 0) + { + if ((ov = std::strchr (a, '=')) != 0) + { + std::string o (a, 0, ov - a); + if ((oi = find (o.c_str ())) != 0) + { + base::next (); + ++ov; + } + } + } + } + + if (oi != 0) + { + if (oi->search_func != 0) + { + std::string f (oi->search_func (ov, oi->arg)); + + if (!f.empty ()) + load (f); + } + else + load (ov); + + if (!args_.empty ()) + return true; + } + else + { + if (!skip_) + skip_ = (std::strcmp (a, "--") == 0); + + return true; + } + } + + return false; + } + + const char* argv_file_scanner:: + peek () + { + if (!more ()) + throw eos_reached (); + + return args_.empty () ? base::peek () : args_.front ().value.c_str (); + } + + const std::string& argv_file_scanner:: + peek_file () + { + if (!more ()) + throw eos_reached (); + + return args_.empty () ? empty_string_ : *args_.front ().file; + } + + std::size_t argv_file_scanner:: + peek_line () + { + if (!more ()) + throw eos_reached (); + + return args_.empty () ? 0 : args_.front ().line; + } + + const char* argv_file_scanner:: + next () + { + if (!more ()) + throw eos_reached (); + + if (args_.empty ()) + return base::next (); + else + { + hold_[i_ == 0 ? ++i_ : --i_].swap (args_.front ().value); + args_.pop_front (); + ++start_position_; + return hold_[i_].c_str (); + } + } + + void argv_file_scanner:: + skip () + { + if (!more ()) + throw eos_reached (); + + if (args_.empty ()) + return base::skip (); + else + { + args_.pop_front (); + ++start_position_; + } + } + + const argv_file_scanner::option_info* argv_file_scanner:: + find (const char* a) const + { + for (std::size_t i (0); i < options_count_; ++i) + if (std::strcmp (a, options_[i].option) == 0) + return &options_[i]; + + return 0; + } + + std::size_t argv_file_scanner:: + position () + { + return start_position_; + } + + void argv_file_scanner:: + load (const std::string& file) + { + using namespace std; + + ifstream is (file.c_str ()); + + if (!is.is_open ()) + throw file_io_failure (file); + + files_.push_back (file); + + arg a; + a.file = &*files_.rbegin (); + + for (a.line = 1; !is.eof (); ++a.line) + { + string line; + getline (is, line); + + if (is.fail () && !is.eof ()) + throw file_io_failure (file); + + string::size_type n (line.size ()); + + // Trim the line from leading and trailing whitespaces. + // + if (n != 0) + { + const char* f (line.c_str ()); + const char* l (f + n); + + const char* of (f); + while (f < l && (*f == ' ' || *f == '\t' || *f == '\r')) + ++f; + + --l; + + const char* ol (l); + while (l > f && (*l == ' ' || *l == '\t' || *l == '\r')) + --l; + + if (f != of || l != ol) + line = f <= l ? string (f, l - f + 1) : string (); + } + + // Ignore empty lines, those that start with #. + // + if (line.empty () || line[0] == '#') + continue; + + string::size_type p (string::npos); + if (line.compare (0, 1, "-") == 0) + { + p = line.find (' '); + + string::size_type q (line.find ('=')); + if (q != string::npos && q < p) + p = q; + } + + string s1; + if (p != string::npos) + { + s1.assign (line, 0, p); + + // Skip leading whitespaces in the argument. + // + if (line[p] == '=') + ++p; + else + { + n = line.size (); + for (++p; p < n; ++p) + { + char c (line[p]); + if (c != ' ' && c != '\t' && c != '\r') + break; + } + } + } + else if (!skip_) + skip_ = (line == "--"); + + string s2 (line, p != string::npos ? p : 0); + + // If the string (which is an option value or argument) is + // wrapped in quotes, remove them. + // + n = s2.size (); + char cf (s2[0]), cl (s2[n - 1]); + + if (cf == '"' || cf == '\'' || cl == '"' || cl == '\'') + { + if (n == 1 || cf != cl) + throw unmatched_quote (s2); + + s2 = string (s2, 1, n - 2); + } + + if (!s1.empty ()) + { + // See if this is another file option. + // + const option_info* oi; + if (!skip_ && (oi = find (s1.c_str ()))) + { + if (s2.empty ()) + throw missing_value (oi->option); + + if (oi->search_func != 0) + { + string f (oi->search_func (s2.c_str (), oi->arg)); + if (!f.empty ()) + load (f); + } + else + { + // If the path of the file being parsed is not simple and the + // path of the file that needs to be loaded is relative, then + // complete the latter using the former as a base. + // +#ifndef _WIN32 + string::size_type p (file.find_last_of ('/')); + bool c (p != string::npos && s2[0] != '/'); +#else + string::size_type p (file.find_last_of ("/\\")); + bool c (p != string::npos && s2[1] != ':'); +#endif + if (c) + s2.insert (0, file, 0, p + 1); + + load (s2); + } + + continue; + } + + a.value = s1; + args_.push_back (a); + } + + a.value = s2; + args_.push_back (a); + } + } + + template + struct parser + { + static void + parse (X& x, bool& xs, scanner& s) + { + using namespace std; + + const char* o (s.next ()); + if (s.more ()) + { + string v (s.next ()); + istringstream is (v); + if (!(is >> x && is.peek () == istringstream::traits_type::eof ())) + throw invalid_value (o, v); + } + else + throw missing_value (o); + + xs = true; + } + }; + + template <> + struct parser + { + static void + parse (bool& x, scanner& s) + { + s.next (); + x = true; + } + }; + + template <> + struct parser + { + static void + parse (std::string& x, bool& xs, scanner& s) + { + const char* o (s.next ()); + + if (s.more ()) + x = s.next (); + else + throw missing_value (o); + + xs = true; + } + }; + + template + struct parser > + { + static void + parse (std::pair& x, bool& xs, scanner& s) + { + x.second = s.position (); + parser::parse (x.first, xs, s); + } + }; + + template + struct parser > + { + static void + parse (std::vector& c, bool& xs, scanner& s) + { + X x; + bool dummy; + parser::parse (x, dummy, s); + c.push_back (x); + xs = true; + } + }; + + template + struct parser > + { + static void + parse (std::set& c, bool& xs, scanner& s) + { + X x; + bool dummy; + parser::parse (x, dummy, s); + c.insert (x); + xs = true; + } + }; + + template + struct parser > + { + static void + parse (std::map& m, bool& xs, scanner& s) + { + const char* o (s.next ()); + + if (s.more ()) + { + std::size_t pos (s.position ()); + std::string ov (s.next ()); + std::string::size_type p = ov.find ('='); + + K k = K (); + V v = V (); + std::string kstr (ov, 0, p); + std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); + + int ac (2); + char* av[] = + { + const_cast (o), + 0 + }; + + bool dummy; + if (!kstr.empty ()) + { + av[1] = const_cast (kstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser::parse (k, dummy, s); + } + + if (!vstr.empty ()) + { + av[1] = const_cast (vstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser::parse (v, dummy, s); + } + + m[k] = v; + } + else + throw missing_value (o); + + xs = true; + } + }; + + template + void + thunk (X& x, scanner& s) + { + parser::parse (x.*M, s); + } + + template + void + thunk (X& x, scanner& s) + { + parser::parse (x.*M, x.*S, s); + } +} + +#include +#include + +// options +// + +options:: +options () +: build2_metadata_ (), + build2_metadata_specified_ (false), + help_ (), + version_ (), + include_path_ (), + include_path_specified_ (false), + output_dir_ (), + output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), + generate_modifier_ (), + generate_specifier_ (), + generate_parse_ (), + generate_merge_ (), + generate_description_ (), + generate_file_scanner_ (), + generate_vector_scanner_ (), + generate_group_scanner_ (), + suppress_inline_ (), + suppress_cli_ (), + cli_namespace_ ("::cli"), + cli_namespace_specified_ (false), + ostream_type_ ("::std::ostream"), + ostream_type_specified_ (false), + generate_cxx_ (), + generate_man_ (), + generate_html_ (), + generate_txt_ (), + stdout__ (), + suppress_undocumented_ (), + suppress_usage_ (), + long_usage_ (), + short_usage_ (), + page_usage_ (), + page_usage_specified_ (false), + option_length_ (0), + option_length_specified_ (false), + ansi_color_ (), + exclude_base_ (), + include_base_last_ (), + class_doc_ (), + class_doc_specified_ (false), + class__ (), + class__specified_ (false), + docvar_ (), + docvar_specified_ (false), + link_regex_ (), + link_regex_specified_ (false), + link_regex_trace_ (), + html_heading_map_ (), + html_heading_map_specified_ (false), + omit_link_check_ (), + hxx_prologue_ (), + hxx_prologue_specified_ (false), + ixx_prologue_ (), + ixx_prologue_specified_ (false), + cxx_prologue_ (), + cxx_prologue_specified_ (false), + man_prologue_ (), + man_prologue_specified_ (false), + html_prologue_ (), + html_prologue_specified_ (false), + txt_prologue_ (), + txt_prologue_specified_ (false), + hxx_epilogue_ (), + hxx_epilogue_specified_ (false), + ixx_epilogue_ (), + ixx_epilogue_specified_ (false), + cxx_epilogue_ (), + cxx_epilogue_specified_ (false), + man_epilogue_ (), + man_epilogue_specified_ (false), + html_epilogue_ (), + html_epilogue_specified_ (false), + txt_epilogue_ (), + txt_epilogue_specified_ (false), + hxx_prologue_file_ (), + hxx_prologue_file_specified_ (false), + ixx_prologue_file_ (), + ixx_prologue_file_specified_ (false), + cxx_prologue_file_ (), + cxx_prologue_file_specified_ (false), + man_prologue_file_ (), + man_prologue_file_specified_ (false), + html_prologue_file_ (), + html_prologue_file_specified_ (false), + txt_prologue_file_ (), + txt_prologue_file_specified_ (false), + hxx_epilogue_file_ (), + hxx_epilogue_file_specified_ (false), + ixx_epilogue_file_ (), + ixx_epilogue_file_specified_ (false), + cxx_epilogue_file_ (), + cxx_epilogue_file_specified_ (false), + man_epilogue_file_ (), + man_epilogue_file_specified_ (false), + html_epilogue_file_ (), + html_epilogue_file_specified_ (false), + txt_epilogue_file_ (), + txt_epilogue_file_specified_ (false), + output_prefix_ (), + output_prefix_specified_ (false), + output_suffix_ (), + output_suffix_specified_ (false), + hxx_suffix_ (".hxx"), + hxx_suffix_specified_ (false), + ixx_suffix_ (".ixx"), + ixx_suffix_specified_ (false), + cxx_suffix_ (".cxx"), + cxx_suffix_specified_ (false), + man_suffix_ (".1"), + man_suffix_specified_ (false), + html_suffix_ (".html"), + html_suffix_specified_ (false), + txt_suffix_ (".txt"), + txt_suffix_specified_ (false), + option_prefix_ ("-"), + option_prefix_specified_ (false), + option_separator_ ("--"), + option_separator_specified_ (false), + keep_separator_ (), + no_combined_flags_ (), + no_combined_values_ (), + include_with_brackets_ (), + include_prefix_ (), + include_prefix_specified_ (false), + guard_prefix_ (), + guard_prefix_specified_ (false), + reserved_name_ (), + reserved_name_specified_ (false), + options_file_ (), + options_file_specified_ (false) +{ +} + +options:: +options (int& argc, + char** argv, + bool erase, + ::cli::unknown_mode opt, + ::cli::unknown_mode arg) +: build2_metadata_ (), + build2_metadata_specified_ (false), + help_ (), + version_ (), + include_path_ (), + include_path_specified_ (false), + output_dir_ (), + output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), + generate_modifier_ (), + generate_specifier_ (), + generate_parse_ (), + generate_merge_ (), + generate_description_ (), + generate_file_scanner_ (), + generate_vector_scanner_ (), + generate_group_scanner_ (), + suppress_inline_ (), + suppress_cli_ (), + cli_namespace_ ("::cli"), + cli_namespace_specified_ (false), + ostream_type_ ("::std::ostream"), + ostream_type_specified_ (false), + generate_cxx_ (), + generate_man_ (), + generate_html_ (), + generate_txt_ (), + stdout__ (), + suppress_undocumented_ (), + suppress_usage_ (), + long_usage_ (), + short_usage_ (), + page_usage_ (), + page_usage_specified_ (false), + option_length_ (0), + option_length_specified_ (false), + ansi_color_ (), + exclude_base_ (), + include_base_last_ (), + class_doc_ (), + class_doc_specified_ (false), + class__ (), + class__specified_ (false), + docvar_ (), + docvar_specified_ (false), + link_regex_ (), + link_regex_specified_ (false), + link_regex_trace_ (), + html_heading_map_ (), + html_heading_map_specified_ (false), + omit_link_check_ (), + hxx_prologue_ (), + hxx_prologue_specified_ (false), + ixx_prologue_ (), + ixx_prologue_specified_ (false), + cxx_prologue_ (), + cxx_prologue_specified_ (false), + man_prologue_ (), + man_prologue_specified_ (false), + html_prologue_ (), + html_prologue_specified_ (false), + txt_prologue_ (), + txt_prologue_specified_ (false), + hxx_epilogue_ (), + hxx_epilogue_specified_ (false), + ixx_epilogue_ (), + ixx_epilogue_specified_ (false), + cxx_epilogue_ (), + cxx_epilogue_specified_ (false), + man_epilogue_ (), + man_epilogue_specified_ (false), + html_epilogue_ (), + html_epilogue_specified_ (false), + txt_epilogue_ (), + txt_epilogue_specified_ (false), + hxx_prologue_file_ (), + hxx_prologue_file_specified_ (false), + ixx_prologue_file_ (), + ixx_prologue_file_specified_ (false), + cxx_prologue_file_ (), + cxx_prologue_file_specified_ (false), + man_prologue_file_ (), + man_prologue_file_specified_ (false), + html_prologue_file_ (), + html_prologue_file_specified_ (false), + txt_prologue_file_ (), + txt_prologue_file_specified_ (false), + hxx_epilogue_file_ (), + hxx_epilogue_file_specified_ (false), + ixx_epilogue_file_ (), + ixx_epilogue_file_specified_ (false), + cxx_epilogue_file_ (), + cxx_epilogue_file_specified_ (false), + man_epilogue_file_ (), + man_epilogue_file_specified_ (false), + html_epilogue_file_ (), + html_epilogue_file_specified_ (false), + txt_epilogue_file_ (), + txt_epilogue_file_specified_ (false), + output_prefix_ (), + output_prefix_specified_ (false), + output_suffix_ (), + output_suffix_specified_ (false), + hxx_suffix_ (".hxx"), + hxx_suffix_specified_ (false), + ixx_suffix_ (".ixx"), + ixx_suffix_specified_ (false), + cxx_suffix_ (".cxx"), + cxx_suffix_specified_ (false), + man_suffix_ (".1"), + man_suffix_specified_ (false), + html_suffix_ (".html"), + html_suffix_specified_ (false), + txt_suffix_ (".txt"), + txt_suffix_specified_ (false), + option_prefix_ ("-"), + option_prefix_specified_ (false), + option_separator_ ("--"), + option_separator_specified_ (false), + keep_separator_ (), + no_combined_flags_ (), + no_combined_values_ (), + include_with_brackets_ (), + include_prefix_ (), + include_prefix_specified_ (false), + guard_prefix_ (), + guard_prefix_specified_ (false), + reserved_name_ (), + reserved_name_specified_ (false), + options_file_ (), + options_file_specified_ (false) +{ + ::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); +} + +options:: +options (int start, + int& argc, + char** argv, + bool erase, + ::cli::unknown_mode opt, + ::cli::unknown_mode arg) +: build2_metadata_ (), + build2_metadata_specified_ (false), + help_ (), + version_ (), + include_path_ (), + include_path_specified_ (false), + output_dir_ (), + output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), + generate_modifier_ (), + generate_specifier_ (), + generate_parse_ (), + generate_merge_ (), + generate_description_ (), + generate_file_scanner_ (), + generate_vector_scanner_ (), + generate_group_scanner_ (), + suppress_inline_ (), + suppress_cli_ (), + cli_namespace_ ("::cli"), + cli_namespace_specified_ (false), + ostream_type_ ("::std::ostream"), + ostream_type_specified_ (false), + generate_cxx_ (), + generate_man_ (), + generate_html_ (), + generate_txt_ (), + stdout__ (), + suppress_undocumented_ (), + suppress_usage_ (), + long_usage_ (), + short_usage_ (), + page_usage_ (), + page_usage_specified_ (false), + option_length_ (0), + option_length_specified_ (false), + ansi_color_ (), + exclude_base_ (), + include_base_last_ (), + class_doc_ (), + class_doc_specified_ (false), + class__ (), + class__specified_ (false), + docvar_ (), + docvar_specified_ (false), + link_regex_ (), + link_regex_specified_ (false), + link_regex_trace_ (), + html_heading_map_ (), + html_heading_map_specified_ (false), + omit_link_check_ (), + hxx_prologue_ (), + hxx_prologue_specified_ (false), + ixx_prologue_ (), + ixx_prologue_specified_ (false), + cxx_prologue_ (), + cxx_prologue_specified_ (false), + man_prologue_ (), + man_prologue_specified_ (false), + html_prologue_ (), + html_prologue_specified_ (false), + txt_prologue_ (), + txt_prologue_specified_ (false), + hxx_epilogue_ (), + hxx_epilogue_specified_ (false), + ixx_epilogue_ (), + ixx_epilogue_specified_ (false), + cxx_epilogue_ (), + cxx_epilogue_specified_ (false), + man_epilogue_ (), + man_epilogue_specified_ (false), + html_epilogue_ (), + html_epilogue_specified_ (false), + txt_epilogue_ (), + txt_epilogue_specified_ (false), + hxx_prologue_file_ (), + hxx_prologue_file_specified_ (false), + ixx_prologue_file_ (), + ixx_prologue_file_specified_ (false), + cxx_prologue_file_ (), + cxx_prologue_file_specified_ (false), + man_prologue_file_ (), + man_prologue_file_specified_ (false), + html_prologue_file_ (), + html_prologue_file_specified_ (false), + txt_prologue_file_ (), + txt_prologue_file_specified_ (false), + hxx_epilogue_file_ (), + hxx_epilogue_file_specified_ (false), + ixx_epilogue_file_ (), + ixx_epilogue_file_specified_ (false), + cxx_epilogue_file_ (), + cxx_epilogue_file_specified_ (false), + man_epilogue_file_ (), + man_epilogue_file_specified_ (false), + html_epilogue_file_ (), + html_epilogue_file_specified_ (false), + txt_epilogue_file_ (), + txt_epilogue_file_specified_ (false), + output_prefix_ (), + output_prefix_specified_ (false), + output_suffix_ (), + output_suffix_specified_ (false), + hxx_suffix_ (".hxx"), + hxx_suffix_specified_ (false), + ixx_suffix_ (".ixx"), + ixx_suffix_specified_ (false), + cxx_suffix_ (".cxx"), + cxx_suffix_specified_ (false), + man_suffix_ (".1"), + man_suffix_specified_ (false), + html_suffix_ (".html"), + html_suffix_specified_ (false), + txt_suffix_ (".txt"), + txt_suffix_specified_ (false), + option_prefix_ ("-"), + option_prefix_specified_ (false), + option_separator_ ("--"), + option_separator_specified_ (false), + keep_separator_ (), + no_combined_flags_ (), + no_combined_values_ (), + include_with_brackets_ (), + include_prefix_ (), + include_prefix_specified_ (false), + guard_prefix_ (), + guard_prefix_specified_ (false), + reserved_name_ (), + reserved_name_specified_ (false), + options_file_ (), + options_file_specified_ (false) +{ + ::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); +} + +options:: +options (int& argc, + char** argv, + int& end, + bool erase, + ::cli::unknown_mode opt, + ::cli::unknown_mode arg) +: build2_metadata_ (), + build2_metadata_specified_ (false), + help_ (), + version_ (), + include_path_ (), + include_path_specified_ (false), + output_dir_ (), + output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), + generate_modifier_ (), + generate_specifier_ (), + generate_parse_ (), + generate_merge_ (), + generate_description_ (), + generate_file_scanner_ (), + generate_vector_scanner_ (), + generate_group_scanner_ (), + suppress_inline_ (), + suppress_cli_ (), + cli_namespace_ ("::cli"), + cli_namespace_specified_ (false), + ostream_type_ ("::std::ostream"), + ostream_type_specified_ (false), + generate_cxx_ (), + generate_man_ (), + generate_html_ (), + generate_txt_ (), + stdout__ (), + suppress_undocumented_ (), + suppress_usage_ (), + long_usage_ (), + short_usage_ (), + page_usage_ (), + page_usage_specified_ (false), + option_length_ (0), + option_length_specified_ (false), + ansi_color_ (), + exclude_base_ (), + include_base_last_ (), + class_doc_ (), + class_doc_specified_ (false), + class__ (), + class__specified_ (false), + docvar_ (), + docvar_specified_ (false), + link_regex_ (), + link_regex_specified_ (false), + link_regex_trace_ (), + html_heading_map_ (), + html_heading_map_specified_ (false), + omit_link_check_ (), + hxx_prologue_ (), + hxx_prologue_specified_ (false), + ixx_prologue_ (), + ixx_prologue_specified_ (false), + cxx_prologue_ (), + cxx_prologue_specified_ (false), + man_prologue_ (), + man_prologue_specified_ (false), + html_prologue_ (), + html_prologue_specified_ (false), + txt_prologue_ (), + txt_prologue_specified_ (false), + hxx_epilogue_ (), + hxx_epilogue_specified_ (false), + ixx_epilogue_ (), + ixx_epilogue_specified_ (false), + cxx_epilogue_ (), + cxx_epilogue_specified_ (false), + man_epilogue_ (), + man_epilogue_specified_ (false), + html_epilogue_ (), + html_epilogue_specified_ (false), + txt_epilogue_ (), + txt_epilogue_specified_ (false), + hxx_prologue_file_ (), + hxx_prologue_file_specified_ (false), + ixx_prologue_file_ (), + ixx_prologue_file_specified_ (false), + cxx_prologue_file_ (), + cxx_prologue_file_specified_ (false), + man_prologue_file_ (), + man_prologue_file_specified_ (false), + html_prologue_file_ (), + html_prologue_file_specified_ (false), + txt_prologue_file_ (), + txt_prologue_file_specified_ (false), + hxx_epilogue_file_ (), + hxx_epilogue_file_specified_ (false), + ixx_epilogue_file_ (), + ixx_epilogue_file_specified_ (false), + cxx_epilogue_file_ (), + cxx_epilogue_file_specified_ (false), + man_epilogue_file_ (), + man_epilogue_file_specified_ (false), + html_epilogue_file_ (), + html_epilogue_file_specified_ (false), + txt_epilogue_file_ (), + txt_epilogue_file_specified_ (false), + output_prefix_ (), + output_prefix_specified_ (false), + output_suffix_ (), + output_suffix_specified_ (false), + hxx_suffix_ (".hxx"), + hxx_suffix_specified_ (false), + ixx_suffix_ (".ixx"), + ixx_suffix_specified_ (false), + cxx_suffix_ (".cxx"), + cxx_suffix_specified_ (false), + man_suffix_ (".1"), + man_suffix_specified_ (false), + html_suffix_ (".html"), + html_suffix_specified_ (false), + txt_suffix_ (".txt"), + txt_suffix_specified_ (false), + option_prefix_ ("-"), + option_prefix_specified_ (false), + option_separator_ ("--"), + option_separator_specified_ (false), + keep_separator_ (), + no_combined_flags_ (), + no_combined_values_ (), + include_with_brackets_ (), + include_prefix_ (), + include_prefix_specified_ (false), + guard_prefix_ (), + guard_prefix_specified_ (false), + reserved_name_ (), + reserved_name_specified_ (false), + options_file_ (), + options_file_specified_ (false) +{ + ::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); +} + +options:: +options (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::cli::unknown_mode opt, + ::cli::unknown_mode arg) +: build2_metadata_ (), + build2_metadata_specified_ (false), + help_ (), + version_ (), + include_path_ (), + include_path_specified_ (false), + output_dir_ (), + output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), + generate_modifier_ (), + generate_specifier_ (), + generate_parse_ (), + generate_merge_ (), + generate_description_ (), + generate_file_scanner_ (), + generate_vector_scanner_ (), + generate_group_scanner_ (), + suppress_inline_ (), + suppress_cli_ (), + cli_namespace_ ("::cli"), + cli_namespace_specified_ (false), + ostream_type_ ("::std::ostream"), + ostream_type_specified_ (false), + generate_cxx_ (), + generate_man_ (), + generate_html_ (), + generate_txt_ (), + stdout__ (), + suppress_undocumented_ (), + suppress_usage_ (), + long_usage_ (), + short_usage_ (), + page_usage_ (), + page_usage_specified_ (false), + option_length_ (0), + option_length_specified_ (false), + ansi_color_ (), + exclude_base_ (), + include_base_last_ (), + class_doc_ (), + class_doc_specified_ (false), + class__ (), + class__specified_ (false), + docvar_ (), + docvar_specified_ (false), + link_regex_ (), + link_regex_specified_ (false), + link_regex_trace_ (), + html_heading_map_ (), + html_heading_map_specified_ (false), + omit_link_check_ (), + hxx_prologue_ (), + hxx_prologue_specified_ (false), + ixx_prologue_ (), + ixx_prologue_specified_ (false), + cxx_prologue_ (), + cxx_prologue_specified_ (false), + man_prologue_ (), + man_prologue_specified_ (false), + html_prologue_ (), + html_prologue_specified_ (false), + txt_prologue_ (), + txt_prologue_specified_ (false), + hxx_epilogue_ (), + hxx_epilogue_specified_ (false), + ixx_epilogue_ (), + ixx_epilogue_specified_ (false), + cxx_epilogue_ (), + cxx_epilogue_specified_ (false), + man_epilogue_ (), + man_epilogue_specified_ (false), + html_epilogue_ (), + html_epilogue_specified_ (false), + txt_epilogue_ (), + txt_epilogue_specified_ (false), + hxx_prologue_file_ (), + hxx_prologue_file_specified_ (false), + ixx_prologue_file_ (), + ixx_prologue_file_specified_ (false), + cxx_prologue_file_ (), + cxx_prologue_file_specified_ (false), + man_prologue_file_ (), + man_prologue_file_specified_ (false), + html_prologue_file_ (), + html_prologue_file_specified_ (false), + txt_prologue_file_ (), + txt_prologue_file_specified_ (false), + hxx_epilogue_file_ (), + hxx_epilogue_file_specified_ (false), + ixx_epilogue_file_ (), + ixx_epilogue_file_specified_ (false), + cxx_epilogue_file_ (), + cxx_epilogue_file_specified_ (false), + man_epilogue_file_ (), + man_epilogue_file_specified_ (false), + html_epilogue_file_ (), + html_epilogue_file_specified_ (false), + txt_epilogue_file_ (), + txt_epilogue_file_specified_ (false), + output_prefix_ (), + output_prefix_specified_ (false), + output_suffix_ (), + output_suffix_specified_ (false), + hxx_suffix_ (".hxx"), + hxx_suffix_specified_ (false), + ixx_suffix_ (".ixx"), + ixx_suffix_specified_ (false), + cxx_suffix_ (".cxx"), + cxx_suffix_specified_ (false), + man_suffix_ (".1"), + man_suffix_specified_ (false), + html_suffix_ (".html"), + html_suffix_specified_ (false), + txt_suffix_ (".txt"), + txt_suffix_specified_ (false), + option_prefix_ ("-"), + option_prefix_specified_ (false), + option_separator_ ("--"), + option_separator_specified_ (false), + keep_separator_ (), + no_combined_flags_ (), + no_combined_values_ (), + include_with_brackets_ (), + include_prefix_ (), + include_prefix_specified_ (false), + guard_prefix_ (), + guard_prefix_specified_ (false), + reserved_name_ (), + reserved_name_specified_ (false), + options_file_ (), + options_file_specified_ (false) +{ + ::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); +} + +options:: +options (::cli::scanner& s, + ::cli::unknown_mode opt, + ::cli::unknown_mode arg) +: build2_metadata_ (), + build2_metadata_specified_ (false), + help_ (), + version_ (), + include_path_ (), + include_path_specified_ (false), + output_dir_ (), + output_dir_specified_ (false), + std_ (cxx_version::cxx98), + std_specified_ (false), + generate_modifier_ (), + generate_specifier_ (), + generate_parse_ (), + generate_merge_ (), + generate_description_ (), + generate_file_scanner_ (), + generate_vector_scanner_ (), + generate_group_scanner_ (), + suppress_inline_ (), + suppress_cli_ (), + cli_namespace_ ("::cli"), + cli_namespace_specified_ (false), + ostream_type_ ("::std::ostream"), + ostream_type_specified_ (false), + generate_cxx_ (), + generate_man_ (), + generate_html_ (), + generate_txt_ (), + stdout__ (), + suppress_undocumented_ (), + suppress_usage_ (), + long_usage_ (), + short_usage_ (), + page_usage_ (), + page_usage_specified_ (false), + option_length_ (0), + option_length_specified_ (false), + ansi_color_ (), + exclude_base_ (), + include_base_last_ (), + class_doc_ (), + class_doc_specified_ (false), + class__ (), + class__specified_ (false), + docvar_ (), + docvar_specified_ (false), + link_regex_ (), + link_regex_specified_ (false), + link_regex_trace_ (), + html_heading_map_ (), + html_heading_map_specified_ (false), + omit_link_check_ (), + hxx_prologue_ (), + hxx_prologue_specified_ (false), + ixx_prologue_ (), + ixx_prologue_specified_ (false), + cxx_prologue_ (), + cxx_prologue_specified_ (false), + man_prologue_ (), + man_prologue_specified_ (false), + html_prologue_ (), + html_prologue_specified_ (false), + txt_prologue_ (), + txt_prologue_specified_ (false), + hxx_epilogue_ (), + hxx_epilogue_specified_ (false), + ixx_epilogue_ (), + ixx_epilogue_specified_ (false), + cxx_epilogue_ (), + cxx_epilogue_specified_ (false), + man_epilogue_ (), + man_epilogue_specified_ (false), + html_epilogue_ (), + html_epilogue_specified_ (false), + txt_epilogue_ (), + txt_epilogue_specified_ (false), + hxx_prologue_file_ (), + hxx_prologue_file_specified_ (false), + ixx_prologue_file_ (), + ixx_prologue_file_specified_ (false), + cxx_prologue_file_ (), + cxx_prologue_file_specified_ (false), + man_prologue_file_ (), + man_prologue_file_specified_ (false), + html_prologue_file_ (), + html_prologue_file_specified_ (false), + txt_prologue_file_ (), + txt_prologue_file_specified_ (false), + hxx_epilogue_file_ (), + hxx_epilogue_file_specified_ (false), + ixx_epilogue_file_ (), + ixx_epilogue_file_specified_ (false), + cxx_epilogue_file_ (), + cxx_epilogue_file_specified_ (false), + man_epilogue_file_ (), + man_epilogue_file_specified_ (false), + html_epilogue_file_ (), + html_epilogue_file_specified_ (false), + txt_epilogue_file_ (), + txt_epilogue_file_specified_ (false), + output_prefix_ (), + output_prefix_specified_ (false), + output_suffix_ (), + output_suffix_specified_ (false), + hxx_suffix_ (".hxx"), + hxx_suffix_specified_ (false), + ixx_suffix_ (".ixx"), + ixx_suffix_specified_ (false), + cxx_suffix_ (".cxx"), + cxx_suffix_specified_ (false), + man_suffix_ (".1"), + man_suffix_specified_ (false), + html_suffix_ (".html"), + html_suffix_specified_ (false), + txt_suffix_ (".txt"), + txt_suffix_specified_ (false), + option_prefix_ ("-"), + option_prefix_specified_ (false), + option_separator_ ("--"), + option_separator_specified_ (false), + keep_separator_ (), + no_combined_flags_ (), + no_combined_values_ (), + include_with_brackets_ (), + include_prefix_ (), + include_prefix_specified_ (false), + guard_prefix_ (), + guard_prefix_specified_ (false), + reserved_name_ (), + reserved_name_specified_ (false), + options_file_ (), + options_file_specified_ (false) +{ + _parse (s, opt, arg); +} + +::cli::usage_para options:: +print_usage (::std::ostream& os, ::cli::usage_para p) +{ + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::cli::usage_para::text) + os << ::std::endl; + + os << "--help Print usage information and exit." << ::std::endl; + + os << "--version Print version and exit." << ::std::endl; + + os << "--include-path|-I Search for bracket-included (<>) options" << ::std::endl + << " files." << ::std::endl; + + os << "--output-dir|-o Write the generated files to instead of the" << ::std::endl + << " current directory." << ::std::endl; + + os << "--std Specify the C++ standard that should be used" << ::std::endl + << " during compilation." << ::std::endl; + + os << "--generate-modifier Generate option value modifiers in addition to" << ::std::endl + << " accessors." << ::std::endl; + + os << "--generate-specifier Generate functions for determining whether the" << ::std::endl + << " option was specified on the command line." << ::std::endl; + + os << "--generate-parse Generate parse() functions instead of parsing" << ::std::endl + << " constructors." << ::std::endl; + + os << "--generate-merge Generate merge() functions." << ::std::endl; + + os << "--generate-description Generate the option description list that can be" << ::std::endl + << " examined at runtime." << ::std::endl; + + os << "--generate-file-scanner Generate the argv_file_scanner implementation." << ::std::endl; + + os << "--generate-vector-scanner Generate the vector_scanner implementation." << ::std::endl; + + os << "--generate-group-scanner Generate the group_scanner implementation." << ::std::endl; + + os << "--suppress-inline Generate all functions non-inline." << ::std::endl; + + os << "--suppress-cli Do not generate the CLI support types (scanners," << ::std::endl + << " parser, etc)." << ::std::endl; + + os << "--cli-namespace Generate the CLI support types in the " << ::std::endl + << " namespace (cli by default)." << ::std::endl; + + os << "--ostream-type Output stream type instead of the default" << ::std::endl + << " std::ostream that should be used to print usage" << ::std::endl + << " and exception information." << ::std::endl; + + os << "--generate-cxx Generate C++ code." << ::std::endl; + + os << "--generate-man Generate documentation in the man page format." << ::std::endl; + + os << "--generate-html Generate documentation in the HTML format." << ::std::endl; + + os << "--generate-txt Generate documentation in the plain text format," << ::std::endl + << " similar to usage." << ::std::endl; + + os << "--stdout Write output to STDOUT instead of a file." << ::std::endl; + + os << "--suppress-undocumented Suppress the generation of documentation entries" << ::std::endl + << " for undocumented options." << ::std::endl; + + os << "--suppress-usage Suppress the generation of the usage printing" << ::std::endl + << " code." << ::std::endl; + + os << "--long-usage If no short documentation string is provided, use" << ::std::endl + << " the complete long documentation string in usage." << ::std::endl; + + os << "--short-usage If specified together with --long-usage, generate" << ::std::endl + << " both short and long usage versions." << ::std::endl; + + os << "--page-usage Generate the combined usage printing code for the" << ::std::endl + << " entire page." << ::std::endl; + + os << "--option-length Indent option descriptions characters when" << ::std::endl + << " printing usage." << ::std::endl; + + os << "--ansi-color Use ANSI color escape sequences when printing" << ::std::endl + << " usage." << ::std::endl; + + os << "--exclude-base Exclude base class information from usage and" << ::std::endl + << " documentation." << ::std::endl; + + os << "--include-base-last Include base class information after derived for" << ::std::endl + << " usage and documentation." << ::std::endl; + + os << "--class-doc = Specify the documentation that should be" << ::std::endl + << " used for the options class ." << ::std::endl; + + os << "--class Generate the man page, HTML, or text documentation" << ::std::endl + << " only for the options class ." << ::std::endl; + + os << "--docvar|-v = Set documentation variable to the value" << ::std::endl + << " ." << ::std::endl; + + os << "--link-regex Add to the list of regular expressions" << ::std::endl + << " used to transform link targets in the generated" << ::std::endl + << " documentation." << ::std::endl; + + os << "--link-regex-trace Trace the process of applying regular expressions" << ::std::endl + << " specified with the --link-regex option." << ::std::endl; + + os << "--html-heading-map = Map CLI heading (valid values: 'H', '0', '1'," << ::std::endl + << " 'h', and '2') to HTML heading (for example," << ::std::endl + << " 'h1', 'h2', etc)." << ::std::endl; + + os << "--omit-link-check Don't check that local fragment link references" << ::std::endl + << " (\\l{#ref ...}) resolve to ids." << ::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 << "--txt-prologue Insert at the beginning of the generated" << ::std::endl + << " text 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 + << " file." << ::std::endl; + + os << "--html-epilogue Insert at the end of the generated HTML" << ::std::endl + << " file." << ::std::endl; + + os << "--txt-epilogue Insert at the end of the generated text" << ::std::endl + << " file." << ::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 generated HTML file." << ::std::endl; + + os << "--txt-prologue-file Insert the content of at the beginning of" << ::std::endl + << " the generated text 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 + << " generated HTML file." << ::std::endl; + + os << "--txt-epilogue-file Insert the content of at the end of the" << ::std::endl + << " generated text file." << ::std::endl; + + os << "--output-prefix Add at the beginning of the generated" << ::std::endl + << " output file name(s)." << ::std::endl; + + os << "--output-suffix Add at the end of the generated output" << ::std::endl + << " file name(s)." << ::std::endl; + + os << "--hxx-suffix Use instead of the default .hxx to" << ::std::endl + << " construct the name of the generated header file." << ::std::endl; + + os << "--ixx-suffix Use instead of the default .ixx to" << ::std::endl + << " construct the name of the generated inline file." << ::std::endl; + + os << "--cxx-suffix Use instead of the default .cxx to" << ::std::endl + << " construct the name of the generated source file." << ::std::endl; + + os << "--man-suffix Use instead of the default .1 to" << ::std::endl + << " construct the name of the generated man page file." << ::std::endl; + + os << "--html-suffix Use instead of the default .html to" << ::std::endl + << " construct the name of the generated HTML file." << ::std::endl; + + os << "--txt-suffix Use instead of the default .txt to" << ::std::endl + << " construct the name of the generated text file." << ::std::endl; + + os << "--option-prefix Use instead of the default '-' as an" << ::std::endl + << " option prefix." << ::std::endl; + + os << "--option-separator Use instead of the default '--' as an" << ::std::endl + << " optional separator between options and arguments." << ::std::endl; + + os << "--keep-separator Leave the option separator in the scanner." << ::std::endl; + + os << "--no-combined-flags Disable support for combining multiple" << ::std::endl + << " single-character flags into a single argument (the" << ::std::endl + << " -xyz form that is equivalent to -x -y -z)." << ::std::endl; + + os << "--no-combined-values Disable support for combining an option and its" << ::std::endl + << " value into a single argument with the assignment" << ::std::endl + << " sign (the option=value form)." << ::std::endl; + + os << "--include-with-brackets Use angle brackets (<>) instead of quotes (\"\") in" << ::std::endl + << " the generated #include directives." << ::std::endl; + + os << "--include-prefix Add to the generated #include directive" << ::std::endl + << " paths." << ::std::endl; + + os << "--guard-prefix Add to the generated header inclusion" << ::std::endl + << " guards." << ::std::endl; + + os << "--reserved-name = Add with an optional replacement to" << ::std::endl + << " the list of names that should not be used as" << ::std::endl + << " identifiers." << ::std::endl; + + os << "--options-file Read additional options from ." << ::std::endl; + + p = ::cli::usage_para::option; + + return p; +} + +typedef +std::map +_cli_options_map; + +static _cli_options_map _cli_options_map_; + +struct _cli_options_map_init +{ + _cli_options_map_init () + { + _cli_options_map_["--build2-metadata"] = + &::cli::thunk< options, std::uint64_t, &options::build2_metadata_, + &options::build2_metadata_specified_ >; + _cli_options_map_["--help"] = + &::cli::thunk< options, bool, &options::help_ >; + _cli_options_map_["--version"] = + &::cli::thunk< options, bool, &options::version_ >; + _cli_options_map_["--include-path"] = + &::cli::thunk< options, std::vector, &options::include_path_, + &options::include_path_specified_ >; + _cli_options_map_["-I"] = + &::cli::thunk< options, std::vector, &options::include_path_, + &options::include_path_specified_ >; + _cli_options_map_["--output-dir"] = + &::cli::thunk< options, std::string, &options::output_dir_, + &options::output_dir_specified_ >; + _cli_options_map_["-o"] = + &::cli::thunk< options, std::string, &options::output_dir_, + &options::output_dir_specified_ >; + _cli_options_map_["--std"] = + &::cli::thunk< options, cxx_version, &options::std_, + &options::std_specified_ >; + _cli_options_map_["--generate-modifier"] = + &::cli::thunk< options, bool, &options::generate_modifier_ >; + _cli_options_map_["--generate-specifier"] = + &::cli::thunk< options, bool, &options::generate_specifier_ >; + _cli_options_map_["--generate-parse"] = + &::cli::thunk< options, bool, &options::generate_parse_ >; + _cli_options_map_["--generate-merge"] = + &::cli::thunk< options, bool, &options::generate_merge_ >; + _cli_options_map_["--generate-description"] = + &::cli::thunk< options, bool, &options::generate_description_ >; + _cli_options_map_["--generate-file-scanner"] = + &::cli::thunk< options, bool, &options::generate_file_scanner_ >; + _cli_options_map_["--generate-vector-scanner"] = + &::cli::thunk< options, bool, &options::generate_vector_scanner_ >; + _cli_options_map_["--generate-group-scanner"] = + &::cli::thunk< options, bool, &options::generate_group_scanner_ >; + _cli_options_map_["--suppress-inline"] = + &::cli::thunk< options, bool, &options::suppress_inline_ >; + _cli_options_map_["--suppress-cli"] = + &::cli::thunk< options, bool, &options::suppress_cli_ >; + _cli_options_map_["--cli-namespace"] = + &::cli::thunk< options, std::string, &options::cli_namespace_, + &options::cli_namespace_specified_ >; + _cli_options_map_["--ostream-type"] = + &::cli::thunk< options, std::string, &options::ostream_type_, + &options::ostream_type_specified_ >; + _cli_options_map_["--generate-cxx"] = + &::cli::thunk< options, bool, &options::generate_cxx_ >; + _cli_options_map_["--generate-man"] = + &::cli::thunk< options, bool, &options::generate_man_ >; + _cli_options_map_["--generate-html"] = + &::cli::thunk< options, bool, &options::generate_html_ >; + _cli_options_map_["--generate-txt"] = + &::cli::thunk< options, bool, &options::generate_txt_ >; + _cli_options_map_["--stdout"] = + &::cli::thunk< options, bool, &options::stdout__ >; + _cli_options_map_["--suppress-undocumented"] = + &::cli::thunk< options, bool, &options::suppress_undocumented_ >; + _cli_options_map_["--suppress-usage"] = + &::cli::thunk< options, bool, &options::suppress_usage_ >; + _cli_options_map_["--long-usage"] = + &::cli::thunk< options, bool, &options::long_usage_ >; + _cli_options_map_["--short-usage"] = + &::cli::thunk< options, bool, &options::short_usage_ >; + _cli_options_map_["--page-usage"] = + &::cli::thunk< options, std::string, &options::page_usage_, + &options::page_usage_specified_ >; + _cli_options_map_["--option-length"] = + &::cli::thunk< options, std::size_t, &options::option_length_, + &options::option_length_specified_ >; + _cli_options_map_["--ansi-color"] = + &::cli::thunk< options, bool, &options::ansi_color_ >; + _cli_options_map_["--exclude-base"] = + &::cli::thunk< options, bool, &options::exclude_base_ >; + _cli_options_map_["--include-base-last"] = + &::cli::thunk< options, bool, &options::include_base_last_ >; + _cli_options_map_["--class-doc"] = + &::cli::thunk< options, std::map, &options::class_doc_, + &options::class_doc_specified_ >; + _cli_options_map_["--class"] = + &::cli::thunk< options, std::vector, &options::class__, + &options::class__specified_ >; + _cli_options_map_["--docvar"] = + &::cli::thunk< options, std::map, &options::docvar_, + &options::docvar_specified_ >; + _cli_options_map_["-v"] = + &::cli::thunk< options, std::map, &options::docvar_, + &options::docvar_specified_ >; + _cli_options_map_["--link-regex"] = + &::cli::thunk< options, std::vector, &options::link_regex_, + &options::link_regex_specified_ >; + _cli_options_map_["--link-regex-trace"] = + &::cli::thunk< options, bool, &options::link_regex_trace_ >; + _cli_options_map_["--html-heading-map"] = + &::cli::thunk< options, std::map, &options::html_heading_map_, + &options::html_heading_map_specified_ >; + _cli_options_map_["--omit-link-check"] = + &::cli::thunk< options, bool, &options::omit_link_check_ >; + _cli_options_map_["--hxx-prologue"] = + &::cli::thunk< options, std::vector, &options::hxx_prologue_, + &options::hxx_prologue_specified_ >; + _cli_options_map_["--ixx-prologue"] = + &::cli::thunk< options, std::vector, &options::ixx_prologue_, + &options::ixx_prologue_specified_ >; + _cli_options_map_["--cxx-prologue"] = + &::cli::thunk< options, std::vector, &options::cxx_prologue_, + &options::cxx_prologue_specified_ >; + _cli_options_map_["--man-prologue"] = + &::cli::thunk< options, std::vector, &options::man_prologue_, + &options::man_prologue_specified_ >; + _cli_options_map_["--html-prologue"] = + &::cli::thunk< options, std::vector, &options::html_prologue_, + &options::html_prologue_specified_ >; + _cli_options_map_["--txt-prologue"] = + &::cli::thunk< options, std::vector, &options::txt_prologue_, + &options::txt_prologue_specified_ >; + _cli_options_map_["--hxx-epilogue"] = + &::cli::thunk< options, std::vector, &options::hxx_epilogue_, + &options::hxx_epilogue_specified_ >; + _cli_options_map_["--ixx-epilogue"] = + &::cli::thunk< options, std::vector, &options::ixx_epilogue_, + &options::ixx_epilogue_specified_ >; + _cli_options_map_["--cxx-epilogue"] = + &::cli::thunk< options, std::vector, &options::cxx_epilogue_, + &options::cxx_epilogue_specified_ >; + _cli_options_map_["--man-epilogue"] = + &::cli::thunk< options, std::vector, &options::man_epilogue_, + &options::man_epilogue_specified_ >; + _cli_options_map_["--html-epilogue"] = + &::cli::thunk< options, std::vector, &options::html_epilogue_, + &options::html_epilogue_specified_ >; + _cli_options_map_["--txt-epilogue"] = + &::cli::thunk< options, std::vector, &options::txt_epilogue_, + &options::txt_epilogue_specified_ >; + _cli_options_map_["--hxx-prologue-file"] = + &::cli::thunk< options, std::string, &options::hxx_prologue_file_, + &options::hxx_prologue_file_specified_ >; + _cli_options_map_["--ixx-prologue-file"] = + &::cli::thunk< options, std::string, &options::ixx_prologue_file_, + &options::ixx_prologue_file_specified_ >; + _cli_options_map_["--cxx-prologue-file"] = + &::cli::thunk< options, std::string, &options::cxx_prologue_file_, + &options::cxx_prologue_file_specified_ >; + _cli_options_map_["--man-prologue-file"] = + &::cli::thunk< options, std::string, &options::man_prologue_file_, + &options::man_prologue_file_specified_ >; + _cli_options_map_["--html-prologue-file"] = + &::cli::thunk< options, std::string, &options::html_prologue_file_, + &options::html_prologue_file_specified_ >; + _cli_options_map_["--txt-prologue-file"] = + &::cli::thunk< options, std::string, &options::txt_prologue_file_, + &options::txt_prologue_file_specified_ >; + _cli_options_map_["--hxx-epilogue-file"] = + &::cli::thunk< options, std::string, &options::hxx_epilogue_file_, + &options::hxx_epilogue_file_specified_ >; + _cli_options_map_["--ixx-epilogue-file"] = + &::cli::thunk< options, std::string, &options::ixx_epilogue_file_, + &options::ixx_epilogue_file_specified_ >; + _cli_options_map_["--cxx-epilogue-file"] = + &::cli::thunk< options, std::string, &options::cxx_epilogue_file_, + &options::cxx_epilogue_file_specified_ >; + _cli_options_map_["--man-epilogue-file"] = + &::cli::thunk< options, std::string, &options::man_epilogue_file_, + &options::man_epilogue_file_specified_ >; + _cli_options_map_["--html-epilogue-file"] = + &::cli::thunk< options, std::string, &options::html_epilogue_file_, + &options::html_epilogue_file_specified_ >; + _cli_options_map_["--txt-epilogue-file"] = + &::cli::thunk< options, std::string, &options::txt_epilogue_file_, + &options::txt_epilogue_file_specified_ >; + _cli_options_map_["--output-prefix"] = + &::cli::thunk< options, std::string, &options::output_prefix_, + &options::output_prefix_specified_ >; + _cli_options_map_["--output-suffix"] = + &::cli::thunk< options, std::string, &options::output_suffix_, + &options::output_suffix_specified_ >; + _cli_options_map_["--hxx-suffix"] = + &::cli::thunk< options, std::string, &options::hxx_suffix_, + &options::hxx_suffix_specified_ >; + _cli_options_map_["--ixx-suffix"] = + &::cli::thunk< options, std::string, &options::ixx_suffix_, + &options::ixx_suffix_specified_ >; + _cli_options_map_["--cxx-suffix"] = + &::cli::thunk< options, std::string, &options::cxx_suffix_, + &options::cxx_suffix_specified_ >; + _cli_options_map_["--man-suffix"] = + &::cli::thunk< options, std::string, &options::man_suffix_, + &options::man_suffix_specified_ >; + _cli_options_map_["--html-suffix"] = + &::cli::thunk< options, std::string, &options::html_suffix_, + &options::html_suffix_specified_ >; + _cli_options_map_["--txt-suffix"] = + &::cli::thunk< options, std::string, &options::txt_suffix_, + &options::txt_suffix_specified_ >; + _cli_options_map_["--option-prefix"] = + &::cli::thunk< options, std::string, &options::option_prefix_, + &options::option_prefix_specified_ >; + _cli_options_map_["--option-separator"] = + &::cli::thunk< options, std::string, &options::option_separator_, + &options::option_separator_specified_ >; + _cli_options_map_["--keep-separator"] = + &::cli::thunk< options, bool, &options::keep_separator_ >; + _cli_options_map_["--no-combined-flags"] = + &::cli::thunk< options, bool, &options::no_combined_flags_ >; + _cli_options_map_["--no-combined-values"] = + &::cli::thunk< options, bool, &options::no_combined_values_ >; + _cli_options_map_["--include-with-brackets"] = + &::cli::thunk< options, bool, &options::include_with_brackets_ >; + _cli_options_map_["--include-prefix"] = + &::cli::thunk< options, std::string, &options::include_prefix_, + &options::include_prefix_specified_ >; + _cli_options_map_["--guard-prefix"] = + &::cli::thunk< options, std::string, &options::guard_prefix_, + &options::guard_prefix_specified_ >; + _cli_options_map_["--reserved-name"] = + &::cli::thunk< options, std::map, &options::reserved_name_, + &options::reserved_name_specified_ >; + _cli_options_map_["--options-file"] = + &::cli::thunk< options, std::string, &options::options_file_, + &options::options_file_specified_ >; + } +}; + +static _cli_options_map_init _cli_options_map_init_; + +bool options:: +_parse (const char* o, ::cli::scanner& s) +{ + _cli_options_map::const_iterator i (_cli_options_map_.find (o)); + + if (i != _cli_options_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; +} + +bool options:: +_parse (::cli::scanner& s, + ::cli::unknown_mode opt_mode, + ::cli::unknown_mode arg_mode) +{ + // Can't skip combined flags (--no-combined-flags). + // + assert (opt_mode != ::cli::unknown_mode::skip); + + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + + if (std::strncmp (o, "-", 1) == 0 && o[1] != '\0') + { + // Handle combined option values. + // + std::string co; + if (const char* v = std::strchr (o, '=')) + { + co.assign (o, 0, v - o); + ++v; + + int ac (2); + char* av[] = + { + const_cast (co.c_str ()), + const_cast (v) + }; + + ::cli::argv_scanner ns (0, ac, av); + + if (_parse (co.c_str (), ns)) + { + // Parsed the option but not its value? + // + if (ns.end () != 2) + throw ::cli::invalid_value (co, v); + + s.next (); + r = true; + continue; + } + else + { + // Set the unknown option and fall through. + // + o = co.c_str (); + } + } + + // Handle combined flags. + // + char cf[3]; + { + const char* p = o + 1; + for (; *p != '\0'; ++p) + { + if (!((*p >= 'a' && *p <= 'z') || + (*p >= 'A' && *p <= 'Z') || + (*p >= '0' && *p <= '9'))) + break; + } + + if (*p == '\0') + { + for (p = o + 1; *p != '\0'; ++p) + { + std::strcpy (cf, "-"); + cf[1] = *p; + cf[2] = '\0'; + + int ac (1); + char* av[] = + { + cf + }; + + ::cli::argv_scanner ns (0, ac, av); + + if (!_parse (cf, ns)) + break; + } + + if (*p == '\0') + { + // All handled. + // + s.next (); + r = true; + continue; + } + else + { + // Set the unknown option and fall through. + // + o = cf; + } + } + } + + switch (opt_mode) + { + case ::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::cli::unknown_mode::stop: + { + break; + } + case ::cli::unknown_mode::fail: + { + throw ::cli::unknown_option (o); + } + } + + break; + } + } + + switch (arg_mode) + { + case ::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::cli::unknown_mode::stop: + { + break; + } + case ::cli::unknown_mode::fail: + { + throw ::cli::unknown_argument (o); + } + } + + break; + } + + return r; +} + +// Begin epilogue. +// +// +// End epilogue. + diff --git a/cli/cli/bootstrap/cli/options.hxx b/cli/cli/bootstrap/cli/options.hxx new file mode 100644 index 0000000..35108fa --- /dev/null +++ b/cli/cli/bootstrap/cli/options.hxx @@ -0,0 +1,1673 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +#ifndef CLI_OPTIONS_HXX +#define CLI_OPTIONS_HXX + +// Begin prologue. +// +// +// End prologue. + +#include +#include +#include +#include +#include +#include + +#ifndef CLI_POTENTIALLY_UNUSED +# if defined(_MSC_VER) || defined(__xlC__) +# define CLI_POTENTIALLY_UNUSED(x) (void*)&x +# else +# define CLI_POTENTIALLY_UNUSED(x) (void)x +# endif +#endif + +namespace cli +{ + class usage_para + { + public: + enum value + { + none, + text, + option + }; + + usage_para (value); + + operator value () const + { + return v_; + } + + private: + value v_; + }; + + class unknown_mode + { + public: + enum value + { + skip, + stop, + fail + }; + + unknown_mode (value); + + operator value () const + { + return v_; + } + + private: + value v_; + }; + + // Exceptions. + // + + class exception: public std::exception + { + public: + virtual void + print (::std::ostream&) const = 0; + }; + + ::std::ostream& + operator<< (::std::ostream&, const exception&); + + class unknown_option: public exception + { + public: + virtual + ~unknown_option () throw (); + + unknown_option (const std::string& option); + + const std::string& + option () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const throw (); + + private: + std::string option_; + }; + + class unknown_argument: public exception + { + public: + virtual + ~unknown_argument () throw (); + + unknown_argument (const std::string& argument); + + const std::string& + argument () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const throw (); + + private: + std::string argument_; + }; + + class missing_value: public exception + { + public: + virtual + ~missing_value () throw (); + + missing_value (const std::string& option); + + const std::string& + option () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const throw (); + + private: + std::string option_; + }; + + class invalid_value: public exception + { + public: + virtual + ~invalid_value () throw (); + + invalid_value (const std::string& option, + const std::string& value, + const std::string& message = std::string ()); + + const std::string& + option () const; + + const std::string& + value () const; + + const std::string& + message () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const throw (); + + private: + std::string option_; + std::string value_; + std::string message_; + }; + + class eos_reached: public exception + { + public: + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const throw (); + }; + + class file_io_failure: public exception + { + public: + virtual + ~file_io_failure () throw (); + + file_io_failure (const std::string& file); + + const std::string& + file () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const throw (); + + private: + std::string file_; + }; + + class unmatched_quote: public exception + { + public: + virtual + ~unmatched_quote () throw (); + + unmatched_quote (const std::string& argument); + + const std::string& + argument () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const throw (); + + private: + std::string argument_; + }; + + // Command line argument scanner interface. + // + // The values returned by next() are guaranteed to be valid + // for the two previous arguments up until a call to a third + // peek() or next(). + // + // The position() function returns a monotonically-increasing + // number which, if stored, can later be used to determine the + // relative position of the argument returned by the following + // call to next(). Note that if multiple scanners are used to + // extract arguments from multiple sources, then the end + // position of the previous scanner should be used as the + // start position of the next. + // + class scanner + { + public: + virtual + ~scanner (); + + virtual bool + more () = 0; + + virtual const char* + peek () = 0; + + virtual const char* + next () = 0; + + virtual void + skip () = 0; + + virtual std::size_t + position () = 0; + }; + + class argv_scanner: public scanner + { + public: + argv_scanner (int& argc, + char** argv, + bool erase = false, + std::size_t start_position = 0); + + argv_scanner (int start, + int& argc, + char** argv, + bool erase = false, + std::size_t start_position = 0); + + int + end () const; + + virtual bool + more (); + + virtual const char* + peek (); + + virtual const char* + next (); + + virtual void + skip (); + + virtual std::size_t + position (); + + protected: + std::size_t start_position_; + int i_; + int& argc_; + char** argv_; + bool erase_; + }; + + class argv_file_scanner: public argv_scanner + { + public: + argv_file_scanner (int& argc, + char** argv, + const std::string& option, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (int start, + int& argc, + char** argv, + const std::string& option, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (const std::string& file, + const std::string& option, + std::size_t start_position = 0); + + struct option_info + { + // If search_func is not NULL, it is called, with the arg + // value as the second argument, to locate the options file. + // If it returns an empty string, then the file is ignored. + // + const char* option; + std::string (*search_func) (const char*, void* arg); + void* arg; + }; + + argv_file_scanner (int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (int start, + int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (const std::string& file, + const option_info* options = 0, + std::size_t options_count = 0, + std::size_t start_position = 0); + + virtual bool + more (); + + virtual const char* + peek (); + + virtual const char* + next (); + + virtual void + skip (); + + virtual std::size_t + position (); + + // Return the file path if the peeked at argument came from a file and + // the empty string otherwise. The reference is guaranteed to be valid + // till the end of the scanner lifetime. + // + const std::string& + peek_file (); + + // Return the 1-based line number if the peeked at argument came from + // a file and zero otherwise. + // + std::size_t + peek_line (); + + private: + const option_info* + find (const char*) const; + + void + load (const std::string& file); + + typedef argv_scanner base; + + const std::string option_; + option_info option_info_; + const option_info* options_; + std::size_t options_count_; + + struct arg + { + std::string value; + const std::string* file; + std::size_t line; + }; + + std::deque args_; + std::list files_; + + // Circular buffer of two arguments. + // + std::string hold_[2]; + std::size_t i_; + + bool skip_; + + static int zero_argc_; + static std::string empty_string_; + }; + + template + struct parser; +} + +#include + +#include + +#include + +#include + +#include + +#include + +class options +{ + public: + options (); + + options (int& argc, + char** argv, + bool erase = false, + ::cli::unknown_mode option = ::cli::unknown_mode::fail, + ::cli::unknown_mode argument = ::cli::unknown_mode::stop); + + options (int start, + int& argc, + char** argv, + bool erase = false, + ::cli::unknown_mode option = ::cli::unknown_mode::fail, + ::cli::unknown_mode argument = ::cli::unknown_mode::stop); + + options (int& argc, + char** argv, + int& end, + bool erase = false, + ::cli::unknown_mode option = ::cli::unknown_mode::fail, + ::cli::unknown_mode argument = ::cli::unknown_mode::stop); + + options (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::cli::unknown_mode option = ::cli::unknown_mode::fail, + ::cli::unknown_mode argument = ::cli::unknown_mode::stop); + + options (::cli::scanner&, + ::cli::unknown_mode option = ::cli::unknown_mode::fail, + ::cli::unknown_mode argument = ::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const std::uint64_t& + build2_metadata () const; + + std::uint64_t& + build2_metadata (); + + void + build2_metadata (const std::uint64_t&); + + bool + build2_metadata_specified () const; + + void + build2_metadata_specified (bool); + + const bool& + help () const; + + bool& + help (); + + void + help (const bool&); + + const bool& + version () const; + + bool& + version (); + + void + version (const bool&); + + const std::vector& + include_path () const; + + std::vector& + include_path (); + + void + include_path (const std::vector&); + + bool + include_path_specified () const; + + void + include_path_specified (bool); + + const std::string& + output_dir () const; + + std::string& + output_dir (); + + void + output_dir (const std::string&); + + bool + output_dir_specified () const; + + void + output_dir_specified (bool); + + const cxx_version& + std () const; + + cxx_version& + std (); + + void + std (const cxx_version&); + + bool + std_specified () const; + + void + std_specified (bool); + + const bool& + generate_modifier () const; + + bool& + generate_modifier (); + + void + generate_modifier (const bool&); + + const bool& + generate_specifier () const; + + bool& + generate_specifier (); + + void + generate_specifier (const bool&); + + const bool& + generate_parse () const; + + bool& + generate_parse (); + + void + generate_parse (const bool&); + + const bool& + generate_merge () const; + + bool& + generate_merge (); + + void + generate_merge (const bool&); + + const bool& + generate_description () const; + + bool& + generate_description (); + + void + generate_description (const bool&); + + const bool& + generate_file_scanner () const; + + bool& + generate_file_scanner (); + + void + generate_file_scanner (const bool&); + + const bool& + generate_vector_scanner () const; + + bool& + generate_vector_scanner (); + + void + generate_vector_scanner (const bool&); + + const bool& + generate_group_scanner () const; + + bool& + generate_group_scanner (); + + void + generate_group_scanner (const bool&); + + const bool& + suppress_inline () const; + + bool& + suppress_inline (); + + void + suppress_inline (const bool&); + + const bool& + suppress_cli () const; + + bool& + suppress_cli (); + + void + suppress_cli (const bool&); + + const std::string& + cli_namespace () const; + + std::string& + cli_namespace (); + + void + cli_namespace (const std::string&); + + bool + cli_namespace_specified () const; + + void + cli_namespace_specified (bool); + + const std::string& + ostream_type () const; + + std::string& + ostream_type (); + + void + ostream_type (const std::string&); + + bool + ostream_type_specified () const; + + void + ostream_type_specified (bool); + + const bool& + generate_cxx () const; + + bool& + generate_cxx (); + + void + generate_cxx (const bool&); + + const bool& + generate_man () const; + + bool& + generate_man (); + + void + generate_man (const bool&); + + const bool& + generate_html () const; + + bool& + generate_html (); + + void + generate_html (const bool&); + + const bool& + generate_txt () const; + + bool& + generate_txt (); + + void + generate_txt (const bool&); + + const bool& + stdout_ () const; + + bool& + stdout_ (); + + void + stdout_ (const bool&); + + const bool& + suppress_undocumented () const; + + bool& + suppress_undocumented (); + + void + suppress_undocumented (const bool&); + + const bool& + suppress_usage () const; + + bool& + suppress_usage (); + + void + suppress_usage (const bool&); + + const bool& + long_usage () const; + + bool& + long_usage (); + + void + long_usage (const bool&); + + const bool& + short_usage () const; + + bool& + short_usage (); + + void + short_usage (const bool&); + + const std::string& + page_usage () const; + + std::string& + page_usage (); + + void + page_usage (const std::string&); + + bool + page_usage_specified () const; + + void + page_usage_specified (bool); + + const std::size_t& + option_length () const; + + std::size_t& + option_length (); + + void + option_length (const std::size_t&); + + bool + option_length_specified () const; + + void + option_length_specified (bool); + + const bool& + ansi_color () const; + + bool& + ansi_color (); + + void + ansi_color (const bool&); + + const bool& + exclude_base () const; + + bool& + exclude_base (); + + void + exclude_base (const bool&); + + const bool& + include_base_last () const; + + bool& + include_base_last (); + + void + include_base_last (const bool&); + + const std::map& + class_doc () const; + + std::map& + class_doc (); + + void + class_doc (const std::map&); + + bool + class_doc_specified () const; + + void + class_doc_specified (bool); + + const std::vector& + class_ () const; + + std::vector& + class_ (); + + void + class_ (const std::vector&); + + bool + class__specified () const; + + void + class__specified (bool); + + const std::map& + docvar () const; + + std::map& + docvar (); + + void + docvar (const std::map&); + + bool + docvar_specified () const; + + void + docvar_specified (bool); + + const std::vector& + link_regex () const; + + std::vector& + link_regex (); + + void + link_regex (const std::vector&); + + bool + link_regex_specified () const; + + void + link_regex_specified (bool); + + const bool& + link_regex_trace () const; + + bool& + link_regex_trace (); + + void + link_regex_trace (const bool&); + + const std::map& + html_heading_map () const; + + std::map& + html_heading_map (); + + void + html_heading_map (const std::map&); + + bool + html_heading_map_specified () const; + + void + html_heading_map_specified (bool); + + const bool& + omit_link_check () const; + + bool& + omit_link_check (); + + void + omit_link_check (const bool&); + + const std::vector& + hxx_prologue () const; + + std::vector& + hxx_prologue (); + + void + hxx_prologue (const std::vector&); + + bool + hxx_prologue_specified () const; + + void + hxx_prologue_specified (bool); + + const std::vector& + ixx_prologue () const; + + std::vector& + ixx_prologue (); + + void + ixx_prologue (const std::vector&); + + bool + ixx_prologue_specified () const; + + void + ixx_prologue_specified (bool); + + const std::vector& + cxx_prologue () const; + + std::vector& + cxx_prologue (); + + void + cxx_prologue (const std::vector&); + + bool + cxx_prologue_specified () const; + + void + cxx_prologue_specified (bool); + + const std::vector& + man_prologue () const; + + std::vector& + man_prologue (); + + void + man_prologue (const std::vector&); + + bool + man_prologue_specified () const; + + void + man_prologue_specified (bool); + + const std::vector& + html_prologue () const; + + std::vector& + html_prologue (); + + void + html_prologue (const std::vector&); + + bool + html_prologue_specified () const; + + void + html_prologue_specified (bool); + + const std::vector& + txt_prologue () const; + + std::vector& + txt_prologue (); + + void + txt_prologue (const std::vector&); + + bool + txt_prologue_specified () const; + + void + txt_prologue_specified (bool); + + const std::vector& + hxx_epilogue () const; + + std::vector& + hxx_epilogue (); + + void + hxx_epilogue (const std::vector&); + + bool + hxx_epilogue_specified () const; + + void + hxx_epilogue_specified (bool); + + const std::vector& + ixx_epilogue () const; + + std::vector& + ixx_epilogue (); + + void + ixx_epilogue (const std::vector&); + + bool + ixx_epilogue_specified () const; + + void + ixx_epilogue_specified (bool); + + const std::vector& + cxx_epilogue () const; + + std::vector& + cxx_epilogue (); + + void + cxx_epilogue (const std::vector&); + + bool + cxx_epilogue_specified () const; + + void + cxx_epilogue_specified (bool); + + const std::vector& + man_epilogue () const; + + std::vector& + man_epilogue (); + + void + man_epilogue (const std::vector&); + + bool + man_epilogue_specified () const; + + void + man_epilogue_specified (bool); + + const std::vector& + html_epilogue () const; + + std::vector& + html_epilogue (); + + void + html_epilogue (const std::vector&); + + bool + html_epilogue_specified () const; + + void + html_epilogue_specified (bool); + + const std::vector& + txt_epilogue () const; + + std::vector& + txt_epilogue (); + + void + txt_epilogue (const std::vector&); + + bool + txt_epilogue_specified () const; + + void + txt_epilogue_specified (bool); + + const std::string& + hxx_prologue_file () const; + + std::string& + hxx_prologue_file (); + + void + hxx_prologue_file (const std::string&); + + bool + hxx_prologue_file_specified () const; + + void + hxx_prologue_file_specified (bool); + + const std::string& + ixx_prologue_file () const; + + std::string& + ixx_prologue_file (); + + void + ixx_prologue_file (const std::string&); + + bool + ixx_prologue_file_specified () const; + + void + ixx_prologue_file_specified (bool); + + const std::string& + cxx_prologue_file () const; + + std::string& + cxx_prologue_file (); + + void + cxx_prologue_file (const std::string&); + + bool + cxx_prologue_file_specified () const; + + void + cxx_prologue_file_specified (bool); + + const std::string& + man_prologue_file () const; + + std::string& + man_prologue_file (); + + void + man_prologue_file (const std::string&); + + bool + man_prologue_file_specified () const; + + void + man_prologue_file_specified (bool); + + const std::string& + html_prologue_file () const; + + std::string& + html_prologue_file (); + + void + html_prologue_file (const std::string&); + + bool + html_prologue_file_specified () const; + + void + html_prologue_file_specified (bool); + + const std::string& + txt_prologue_file () const; + + std::string& + txt_prologue_file (); + + void + txt_prologue_file (const std::string&); + + bool + txt_prologue_file_specified () const; + + void + txt_prologue_file_specified (bool); + + const std::string& + hxx_epilogue_file () const; + + std::string& + hxx_epilogue_file (); + + void + hxx_epilogue_file (const std::string&); + + bool + hxx_epilogue_file_specified () const; + + void + hxx_epilogue_file_specified (bool); + + const std::string& + ixx_epilogue_file () const; + + std::string& + ixx_epilogue_file (); + + void + ixx_epilogue_file (const std::string&); + + bool + ixx_epilogue_file_specified () const; + + void + ixx_epilogue_file_specified (bool); + + const std::string& + cxx_epilogue_file () const; + + std::string& + cxx_epilogue_file (); + + void + cxx_epilogue_file (const std::string&); + + bool + cxx_epilogue_file_specified () const; + + void + cxx_epilogue_file_specified (bool); + + const std::string& + man_epilogue_file () const; + + std::string& + man_epilogue_file (); + + void + man_epilogue_file (const std::string&); + + bool + man_epilogue_file_specified () const; + + void + man_epilogue_file_specified (bool); + + const std::string& + html_epilogue_file () const; + + std::string& + html_epilogue_file (); + + void + html_epilogue_file (const std::string&); + + bool + html_epilogue_file_specified () const; + + void + html_epilogue_file_specified (bool); + + const std::string& + txt_epilogue_file () const; + + std::string& + txt_epilogue_file (); + + void + txt_epilogue_file (const std::string&); + + bool + txt_epilogue_file_specified () const; + + void + txt_epilogue_file_specified (bool); + + const std::string& + output_prefix () const; + + std::string& + output_prefix (); + + void + output_prefix (const std::string&); + + bool + output_prefix_specified () const; + + void + output_prefix_specified (bool); + + const std::string& + output_suffix () const; + + std::string& + output_suffix (); + + void + output_suffix (const std::string&); + + bool + output_suffix_specified () const; + + void + output_suffix_specified (bool); + + const std::string& + hxx_suffix () const; + + std::string& + hxx_suffix (); + + void + hxx_suffix (const std::string&); + + bool + hxx_suffix_specified () const; + + void + hxx_suffix_specified (bool); + + const std::string& + ixx_suffix () const; + + std::string& + ixx_suffix (); + + void + ixx_suffix (const std::string&); + + bool + ixx_suffix_specified () const; + + void + ixx_suffix_specified (bool); + + const std::string& + cxx_suffix () const; + + std::string& + cxx_suffix (); + + void + cxx_suffix (const std::string&); + + bool + cxx_suffix_specified () const; + + void + cxx_suffix_specified (bool); + + const std::string& + man_suffix () const; + + std::string& + man_suffix (); + + void + man_suffix (const std::string&); + + bool + man_suffix_specified () const; + + void + man_suffix_specified (bool); + + const std::string& + html_suffix () const; + + std::string& + html_suffix (); + + void + html_suffix (const std::string&); + + bool + html_suffix_specified () const; + + void + html_suffix_specified (bool); + + const std::string& + txt_suffix () const; + + std::string& + txt_suffix (); + + void + txt_suffix (const std::string&); + + bool + txt_suffix_specified () const; + + void + txt_suffix_specified (bool); + + const std::string& + option_prefix () const; + + std::string& + option_prefix (); + + void + option_prefix (const std::string&); + + bool + option_prefix_specified () const; + + void + option_prefix_specified (bool); + + const std::string& + option_separator () const; + + std::string& + option_separator (); + + void + option_separator (const std::string&); + + bool + option_separator_specified () const; + + void + option_separator_specified (bool); + + const bool& + keep_separator () const; + + bool& + keep_separator (); + + void + keep_separator (const bool&); + + const bool& + no_combined_flags () const; + + bool& + no_combined_flags (); + + void + no_combined_flags (const bool&); + + const bool& + no_combined_values () const; + + bool& + no_combined_values (); + + void + no_combined_values (const bool&); + + const bool& + include_with_brackets () const; + + bool& + include_with_brackets (); + + void + include_with_brackets (const bool&); + + const std::string& + include_prefix () const; + + std::string& + include_prefix (); + + void + include_prefix (const std::string&); + + bool + include_prefix_specified () const; + + void + include_prefix_specified (bool); + + const std::string& + guard_prefix () const; + + std::string& + guard_prefix (); + + void + guard_prefix (const std::string&); + + bool + guard_prefix_specified () const; + + void + guard_prefix_specified (bool); + + const std::map& + reserved_name () const; + + std::map& + reserved_name (); + + void + reserved_name (const std::map&); + + bool + reserved_name_specified () const; + + void + reserved_name_specified (bool); + + const std::string& + options_file () const; + + std::string& + options_file (); + + void + options_file (const std::string&); + + bool + options_file_specified () const; + + void + options_file_specified (bool); + + // Print usage information. + // + static ::cli::usage_para + print_usage (::std::ostream&, + ::cli::usage_para = ::cli::usage_para::none); + + // Implementation details. + // + protected: + bool + _parse (const char*, ::cli::scanner&); + + private: + bool + _parse (::cli::scanner&, + ::cli::unknown_mode option, + ::cli::unknown_mode argument); + + public: + std::uint64_t build2_metadata_; + bool build2_metadata_specified_; + bool help_; + bool version_; + std::vector include_path_; + bool include_path_specified_; + std::string output_dir_; + bool output_dir_specified_; + cxx_version std_; + bool std_specified_; + bool generate_modifier_; + bool generate_specifier_; + bool generate_parse_; + bool generate_merge_; + bool generate_description_; + bool generate_file_scanner_; + bool generate_vector_scanner_; + bool generate_group_scanner_; + bool suppress_inline_; + bool suppress_cli_; + std::string cli_namespace_; + bool cli_namespace_specified_; + std::string ostream_type_; + bool ostream_type_specified_; + bool generate_cxx_; + bool generate_man_; + bool generate_html_; + bool generate_txt_; + bool stdout__; + bool suppress_undocumented_; + bool suppress_usage_; + bool long_usage_; + bool short_usage_; + std::string page_usage_; + bool page_usage_specified_; + std::size_t option_length_; + bool option_length_specified_; + bool ansi_color_; + bool exclude_base_; + bool include_base_last_; + std::map class_doc_; + bool class_doc_specified_; + std::vector class__; + bool class__specified_; + std::map docvar_; + bool docvar_specified_; + std::vector link_regex_; + bool link_regex_specified_; + bool link_regex_trace_; + std::map html_heading_map_; + bool html_heading_map_specified_; + bool omit_link_check_; + std::vector hxx_prologue_; + bool hxx_prologue_specified_; + std::vector ixx_prologue_; + bool ixx_prologue_specified_; + std::vector cxx_prologue_; + bool cxx_prologue_specified_; + std::vector man_prologue_; + bool man_prologue_specified_; + std::vector html_prologue_; + bool html_prologue_specified_; + std::vector txt_prologue_; + bool txt_prologue_specified_; + std::vector hxx_epilogue_; + bool hxx_epilogue_specified_; + std::vector ixx_epilogue_; + bool ixx_epilogue_specified_; + std::vector cxx_epilogue_; + bool cxx_epilogue_specified_; + std::vector man_epilogue_; + bool man_epilogue_specified_; + std::vector html_epilogue_; + bool html_epilogue_specified_; + std::vector txt_epilogue_; + bool txt_epilogue_specified_; + std::string hxx_prologue_file_; + bool hxx_prologue_file_specified_; + std::string ixx_prologue_file_; + bool ixx_prologue_file_specified_; + std::string cxx_prologue_file_; + bool cxx_prologue_file_specified_; + std::string man_prologue_file_; + bool man_prologue_file_specified_; + std::string html_prologue_file_; + bool html_prologue_file_specified_; + std::string txt_prologue_file_; + bool txt_prologue_file_specified_; + std::string hxx_epilogue_file_; + bool hxx_epilogue_file_specified_; + std::string ixx_epilogue_file_; + bool ixx_epilogue_file_specified_; + std::string cxx_epilogue_file_; + bool cxx_epilogue_file_specified_; + std::string man_epilogue_file_; + bool man_epilogue_file_specified_; + std::string html_epilogue_file_; + bool html_epilogue_file_specified_; + std::string txt_epilogue_file_; + bool txt_epilogue_file_specified_; + std::string output_prefix_; + bool output_prefix_specified_; + std::string output_suffix_; + bool output_suffix_specified_; + std::string hxx_suffix_; + bool hxx_suffix_specified_; + std::string ixx_suffix_; + bool ixx_suffix_specified_; + std::string cxx_suffix_; + bool cxx_suffix_specified_; + std::string man_suffix_; + bool man_suffix_specified_; + std::string html_suffix_; + bool html_suffix_specified_; + std::string txt_suffix_; + bool txt_suffix_specified_; + std::string option_prefix_; + bool option_prefix_specified_; + std::string option_separator_; + bool option_separator_specified_; + bool keep_separator_; + bool no_combined_flags_; + bool no_combined_values_; + bool include_with_brackets_; + std::string include_prefix_; + bool include_prefix_specified_; + std::string guard_prefix_; + bool guard_prefix_specified_; + std::map reserved_name_; + bool reserved_name_specified_; + std::string options_file_; + bool options_file_specified_; +}; + +#include + +// Begin epilogue. +// +// +// End epilogue. + +#endif // CLI_OPTIONS_HXX diff --git a/cli/cli/bootstrap/cli/options.ixx b/cli/cli/bootstrap/cli/options.ixx new file mode 100644 index 0000000..ee4cbdb --- /dev/null +++ b/cli/cli/bootstrap/cli/options.ixx @@ -0,0 +1,2352 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +// Begin prologue. +// +// +// End prologue. + +#include + +namespace cli +{ + // usage_para + // + inline usage_para:: + usage_para (value v) + : v_ (v) + { + } + + // unknown_mode + // + inline unknown_mode:: + unknown_mode (value v) + : v_ (v) + { + } + + // exception + // + inline ::std::ostream& + operator<< (::std::ostream& os, const exception& e) + { + e.print (os); + return os; + } + + // unknown_option + // + inline unknown_option:: + unknown_option (const std::string& option) + : option_ (option) + { + } + + inline const std::string& unknown_option:: + option () const + { + return option_; + } + + // unknown_argument + // + inline unknown_argument:: + unknown_argument (const std::string& argument) + : argument_ (argument) + { + } + + inline const std::string& unknown_argument:: + argument () const + { + return argument_; + } + + // missing_value + // + inline missing_value:: + missing_value (const std::string& option) + : option_ (option) + { + } + + inline const std::string& missing_value:: + option () const + { + return option_; + } + + // invalid_value + // + inline invalid_value:: + invalid_value (const std::string& option, + const std::string& value, + const std::string& message) + : option_ (option), + value_ (value), + message_ (message) + { + } + + inline const std::string& invalid_value:: + option () const + { + return option_; + } + + inline const std::string& invalid_value:: + value () const + { + return value_; + } + + inline const std::string& invalid_value:: + message () const + { + return message_; + } + + // file_io_failure + // + inline file_io_failure:: + file_io_failure (const std::string& file) + : file_ (file) + { + } + + inline const std::string& file_io_failure:: + file () const + { + return file_; + } + + // unmatched_quote + // + inline unmatched_quote:: + unmatched_quote (const std::string& argument) + : argument_ (argument) + { + } + + inline const std::string& unmatched_quote:: + argument () const + { + return argument_; + } + + // argv_scanner + // + inline argv_scanner:: + argv_scanner (int& argc, + char** argv, + bool erase, + std::size_t sp) + : start_position_ (sp + 1), + i_ (1), + argc_ (argc), + argv_ (argv), + erase_ (erase) + { + } + + inline argv_scanner:: + argv_scanner (int start, + int& argc, + char** argv, + bool erase, + std::size_t sp) + : start_position_ (sp + static_cast (start)), + i_ (start), + argc_ (argc), + argv_ (argv), + erase_ (erase) + { + } + + inline int argv_scanner:: + end () const + { + return i_; + } + + // argv_file_scanner + // + inline argv_file_scanner:: + argv_file_scanner (int& argc, + char** argv, + const std::string& option, + bool erase, + std::size_t sp) + : argv_scanner (argc, argv, erase, sp), + option_ (option), + options_ (&option_info_), + options_count_ (1), + i_ (1), + skip_ (false) + { + option_info_.option = option_.c_str (); + option_info_.search_func = 0; + } + + inline argv_file_scanner:: + argv_file_scanner (int start, + int& argc, + char** argv, + const std::string& option, + bool erase, + std::size_t sp) + : argv_scanner (start, argc, argv, erase, sp), + option_ (option), + options_ (&option_info_), + options_count_ (1), + i_ (1), + skip_ (false) + { + option_info_.option = option_.c_str (); + option_info_.search_func = 0; + } + + inline argv_file_scanner:: + argv_file_scanner (const std::string& file, + const std::string& option, + std::size_t sp) + : argv_scanner (0, zero_argc_, 0, sp), + option_ (option), + options_ (&option_info_), + options_count_ (1), + i_ (1), + skip_ (false) + { + option_info_.option = option_.c_str (); + option_info_.search_func = 0; + + load (file); + } + + inline argv_file_scanner:: + argv_file_scanner (int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase, + std::size_t sp) + : argv_scanner (argc, argv, erase, sp), + options_ (options), + options_count_ (options_count), + i_ (1), + skip_ (false) + { + } + + inline argv_file_scanner:: + argv_file_scanner (int start, + int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase, + std::size_t sp) + : argv_scanner (start, argc, argv, erase, sp), + options_ (options), + options_count_ (options_count), + i_ (1), + skip_ (false) + { + } + + inline argv_file_scanner:: + argv_file_scanner (const std::string& file, + const option_info* options, + std::size_t options_count, + std::size_t sp) + : argv_scanner (0, zero_argc_, 0, sp), + options_ (options), + options_count_ (options_count), + i_ (1), + skip_ (false) + { + load (file); + } +} + +// options +// + +inline const std::uint64_t& options:: +build2_metadata () const +{ + return this->build2_metadata_; +} + +inline std::uint64_t& options:: +build2_metadata () +{ + return this->build2_metadata_; +} + +inline void options:: +build2_metadata (const std::uint64_t& x) +{ + this->build2_metadata_ = x; +} + +inline bool options:: +build2_metadata_specified () const +{ + return this->build2_metadata_specified_; +} + +inline void options:: +build2_metadata_specified (bool x) +{ + this->build2_metadata_specified_ = x; +} + +inline const bool& options:: +help () const +{ + return this->help_; +} + +inline bool& options:: +help () +{ + return this->help_; +} + +inline void options:: +help (const bool& x) +{ + this->help_ = x; +} + +inline const bool& options:: +version () const +{ + return this->version_; +} + +inline bool& options:: +version () +{ + return this->version_; +} + +inline void options:: +version (const bool& x) +{ + this->version_ = x; +} + +inline const std::vector& options:: +include_path () const +{ + return this->include_path_; +} + +inline std::vector& options:: +include_path () +{ + return this->include_path_; +} + +inline void options:: +include_path (const std::vector& x) +{ + this->include_path_ = x; +} + +inline bool options:: +include_path_specified () const +{ + return this->include_path_specified_; +} + +inline void options:: +include_path_specified (bool x) +{ + this->include_path_specified_ = x; +} + +inline const std::string& options:: +output_dir () const +{ + return this->output_dir_; +} + +inline std::string& options:: +output_dir () +{ + return this->output_dir_; +} + +inline void options:: +output_dir (const std::string& x) +{ + this->output_dir_ = x; +} + +inline bool options:: +output_dir_specified () const +{ + return this->output_dir_specified_; +} + +inline void options:: +output_dir_specified (bool x) +{ + this->output_dir_specified_ = x; +} + +inline const cxx_version& options:: +std () const +{ + return this->std_; +} + +inline cxx_version& options:: +std () +{ + return this->std_; +} + +inline void options:: +std (const cxx_version& x) +{ + this->std_ = x; +} + +inline bool options:: +std_specified () const +{ + return this->std_specified_; +} + +inline void options:: +std_specified (bool x) +{ + this->std_specified_ = x; +} + +inline const bool& options:: +generate_modifier () const +{ + return this->generate_modifier_; +} + +inline bool& options:: +generate_modifier () +{ + return this->generate_modifier_; +} + +inline void options:: +generate_modifier (const bool& x) +{ + this->generate_modifier_ = x; +} + +inline const bool& options:: +generate_specifier () const +{ + return this->generate_specifier_; +} + +inline bool& options:: +generate_specifier () +{ + return this->generate_specifier_; +} + +inline void options:: +generate_specifier (const bool& x) +{ + this->generate_specifier_ = x; +} + +inline const bool& options:: +generate_parse () const +{ + return this->generate_parse_; +} + +inline bool& options:: +generate_parse () +{ + return this->generate_parse_; +} + +inline void options:: +generate_parse (const bool& x) +{ + this->generate_parse_ = x; +} + +inline const bool& options:: +generate_merge () const +{ + return this->generate_merge_; +} + +inline bool& options:: +generate_merge () +{ + return this->generate_merge_; +} + +inline void options:: +generate_merge (const bool& x) +{ + this->generate_merge_ = x; +} + +inline const bool& options:: +generate_description () const +{ + return this->generate_description_; +} + +inline bool& options:: +generate_description () +{ + return this->generate_description_; +} + +inline void options:: +generate_description (const bool& x) +{ + this->generate_description_ = x; +} + +inline const bool& options:: +generate_file_scanner () const +{ + return this->generate_file_scanner_; +} + +inline bool& options:: +generate_file_scanner () +{ + return this->generate_file_scanner_; +} + +inline void options:: +generate_file_scanner (const bool& x) +{ + this->generate_file_scanner_ = x; +} + +inline const bool& options:: +generate_vector_scanner () const +{ + return this->generate_vector_scanner_; +} + +inline bool& options:: +generate_vector_scanner () +{ + return this->generate_vector_scanner_; +} + +inline void options:: +generate_vector_scanner (const bool& x) +{ + this->generate_vector_scanner_ = x; +} + +inline const bool& options:: +generate_group_scanner () const +{ + return this->generate_group_scanner_; +} + +inline bool& options:: +generate_group_scanner () +{ + return this->generate_group_scanner_; +} + +inline void options:: +generate_group_scanner (const bool& x) +{ + this->generate_group_scanner_ = x; +} + +inline const bool& options:: +suppress_inline () const +{ + return this->suppress_inline_; +} + +inline bool& options:: +suppress_inline () +{ + return this->suppress_inline_; +} + +inline void options:: +suppress_inline (const bool& x) +{ + this->suppress_inline_ = x; +} + +inline const bool& options:: +suppress_cli () const +{ + return this->suppress_cli_; +} + +inline bool& options:: +suppress_cli () +{ + return this->suppress_cli_; +} + +inline void options:: +suppress_cli (const bool& x) +{ + this->suppress_cli_ = x; +} + +inline const std::string& options:: +cli_namespace () const +{ + return this->cli_namespace_; +} + +inline std::string& options:: +cli_namespace () +{ + return this->cli_namespace_; +} + +inline void options:: +cli_namespace (const std::string& x) +{ + this->cli_namespace_ = x; +} + +inline bool options:: +cli_namespace_specified () const +{ + return this->cli_namespace_specified_; +} + +inline void options:: +cli_namespace_specified (bool x) +{ + this->cli_namespace_specified_ = x; +} + +inline const std::string& options:: +ostream_type () const +{ + return this->ostream_type_; +} + +inline std::string& options:: +ostream_type () +{ + return this->ostream_type_; +} + +inline void options:: +ostream_type (const std::string& x) +{ + this->ostream_type_ = x; +} + +inline bool options:: +ostream_type_specified () const +{ + return this->ostream_type_specified_; +} + +inline void options:: +ostream_type_specified (bool x) +{ + this->ostream_type_specified_ = x; +} + +inline const bool& options:: +generate_cxx () const +{ + return this->generate_cxx_; +} + +inline bool& options:: +generate_cxx () +{ + return this->generate_cxx_; +} + +inline void options:: +generate_cxx (const bool& x) +{ + this->generate_cxx_ = x; +} + +inline const bool& options:: +generate_man () const +{ + return this->generate_man_; +} + +inline bool& options:: +generate_man () +{ + return this->generate_man_; +} + +inline void options:: +generate_man (const bool& x) +{ + this->generate_man_ = x; +} + +inline const bool& options:: +generate_html () const +{ + return this->generate_html_; +} + +inline bool& options:: +generate_html () +{ + return this->generate_html_; +} + +inline void options:: +generate_html (const bool& x) +{ + this->generate_html_ = x; +} + +inline const bool& options:: +generate_txt () const +{ + return this->generate_txt_; +} + +inline bool& options:: +generate_txt () +{ + return this->generate_txt_; +} + +inline void options:: +generate_txt (const bool& x) +{ + this->generate_txt_ = x; +} + +inline const bool& options:: +stdout_ () const +{ + return this->stdout__; +} + +inline bool& options:: +stdout_ () +{ + return this->stdout__; +} + +inline void options:: +stdout_ (const bool& x) +{ + this->stdout__ = x; +} + +inline const bool& options:: +suppress_undocumented () const +{ + return this->suppress_undocumented_; +} + +inline bool& options:: +suppress_undocumented () +{ + return this->suppress_undocumented_; +} + +inline void options:: +suppress_undocumented (const bool& x) +{ + this->suppress_undocumented_ = x; +} + +inline const bool& options:: +suppress_usage () const +{ + return this->suppress_usage_; +} + +inline bool& options:: +suppress_usage () +{ + return this->suppress_usage_; +} + +inline void options:: +suppress_usage (const bool& x) +{ + this->suppress_usage_ = x; +} + +inline const bool& options:: +long_usage () const +{ + return this->long_usage_; +} + +inline bool& options:: +long_usage () +{ + return this->long_usage_; +} + +inline void options:: +long_usage (const bool& x) +{ + this->long_usage_ = x; +} + +inline const bool& options:: +short_usage () const +{ + return this->short_usage_; +} + +inline bool& options:: +short_usage () +{ + return this->short_usage_; +} + +inline void options:: +short_usage (const bool& x) +{ + this->short_usage_ = x; +} + +inline const std::string& options:: +page_usage () const +{ + return this->page_usage_; +} + +inline std::string& options:: +page_usage () +{ + return this->page_usage_; +} + +inline void options:: +page_usage (const std::string& x) +{ + this->page_usage_ = x; +} + +inline bool options:: +page_usage_specified () const +{ + return this->page_usage_specified_; +} + +inline void options:: +page_usage_specified (bool x) +{ + this->page_usage_specified_ = x; +} + +inline const std::size_t& options:: +option_length () const +{ + return this->option_length_; +} + +inline std::size_t& options:: +option_length () +{ + return this->option_length_; +} + +inline void options:: +option_length (const std::size_t& x) +{ + this->option_length_ = x; +} + +inline bool options:: +option_length_specified () const +{ + return this->option_length_specified_; +} + +inline void options:: +option_length_specified (bool x) +{ + this->option_length_specified_ = x; +} + +inline const bool& options:: +ansi_color () const +{ + return this->ansi_color_; +} + +inline bool& options:: +ansi_color () +{ + return this->ansi_color_; +} + +inline void options:: +ansi_color (const bool& x) +{ + this->ansi_color_ = x; +} + +inline const bool& options:: +exclude_base () const +{ + return this->exclude_base_; +} + +inline bool& options:: +exclude_base () +{ + return this->exclude_base_; +} + +inline void options:: +exclude_base (const bool& x) +{ + this->exclude_base_ = x; +} + +inline const bool& options:: +include_base_last () const +{ + return this->include_base_last_; +} + +inline bool& options:: +include_base_last () +{ + return this->include_base_last_; +} + +inline void options:: +include_base_last (const bool& x) +{ + this->include_base_last_ = x; +} + +inline const std::map& options:: +class_doc () const +{ + return this->class_doc_; +} + +inline std::map& options:: +class_doc () +{ + return this->class_doc_; +} + +inline void options:: +class_doc (const std::map& x) +{ + this->class_doc_ = x; +} + +inline bool options:: +class_doc_specified () const +{ + return this->class_doc_specified_; +} + +inline void options:: +class_doc_specified (bool x) +{ + this->class_doc_specified_ = x; +} + +inline const std::vector& options:: +class_ () const +{ + return this->class__; +} + +inline std::vector& options:: +class_ () +{ + return this->class__; +} + +inline void options:: +class_ (const std::vector& x) +{ + this->class__ = x; +} + +inline bool options:: +class__specified () const +{ + return this->class__specified_; +} + +inline void options:: +class__specified (bool x) +{ + this->class__specified_ = x; +} + +inline const std::map& options:: +docvar () const +{ + return this->docvar_; +} + +inline std::map& options:: +docvar () +{ + return this->docvar_; +} + +inline void options:: +docvar (const std::map& x) +{ + this->docvar_ = x; +} + +inline bool options:: +docvar_specified () const +{ + return this->docvar_specified_; +} + +inline void options:: +docvar_specified (bool x) +{ + this->docvar_specified_ = x; +} + +inline const std::vector& options:: +link_regex () const +{ + return this->link_regex_; +} + +inline std::vector& options:: +link_regex () +{ + return this->link_regex_; +} + +inline void options:: +link_regex (const std::vector& x) +{ + this->link_regex_ = x; +} + +inline bool options:: +link_regex_specified () const +{ + return this->link_regex_specified_; +} + +inline void options:: +link_regex_specified (bool x) +{ + this->link_regex_specified_ = x; +} + +inline const bool& options:: +link_regex_trace () const +{ + return this->link_regex_trace_; +} + +inline bool& options:: +link_regex_trace () +{ + return this->link_regex_trace_; +} + +inline void options:: +link_regex_trace (const bool& x) +{ + this->link_regex_trace_ = x; +} + +inline const std::map& options:: +html_heading_map () const +{ + return this->html_heading_map_; +} + +inline std::map& options:: +html_heading_map () +{ + return this->html_heading_map_; +} + +inline void options:: +html_heading_map (const std::map& x) +{ + this->html_heading_map_ = x; +} + +inline bool options:: +html_heading_map_specified () const +{ + return this->html_heading_map_specified_; +} + +inline void options:: +html_heading_map_specified (bool x) +{ + this->html_heading_map_specified_ = x; +} + +inline const bool& options:: +omit_link_check () const +{ + return this->omit_link_check_; +} + +inline bool& options:: +omit_link_check () +{ + return this->omit_link_check_; +} + +inline void options:: +omit_link_check (const bool& x) +{ + this->omit_link_check_ = x; +} + +inline const std::vector& options:: +hxx_prologue () const +{ + return this->hxx_prologue_; +} + +inline std::vector& options:: +hxx_prologue () +{ + return this->hxx_prologue_; +} + +inline void options:: +hxx_prologue (const std::vector& x) +{ + this->hxx_prologue_ = x; +} + +inline bool options:: +hxx_prologue_specified () const +{ + return this->hxx_prologue_specified_; +} + +inline void options:: +hxx_prologue_specified (bool x) +{ + this->hxx_prologue_specified_ = x; +} + +inline const std::vector& options:: +ixx_prologue () const +{ + return this->ixx_prologue_; +} + +inline std::vector& options:: +ixx_prologue () +{ + return this->ixx_prologue_; +} + +inline void options:: +ixx_prologue (const std::vector& x) +{ + this->ixx_prologue_ = x; +} + +inline bool options:: +ixx_prologue_specified () const +{ + return this->ixx_prologue_specified_; +} + +inline void options:: +ixx_prologue_specified (bool x) +{ + this->ixx_prologue_specified_ = x; +} + +inline const std::vector& options:: +cxx_prologue () const +{ + return this->cxx_prologue_; +} + +inline std::vector& options:: +cxx_prologue () +{ + return this->cxx_prologue_; +} + +inline void options:: +cxx_prologue (const std::vector& x) +{ + this->cxx_prologue_ = x; +} + +inline bool options:: +cxx_prologue_specified () const +{ + return this->cxx_prologue_specified_; +} + +inline void options:: +cxx_prologue_specified (bool x) +{ + this->cxx_prologue_specified_ = x; +} + +inline const std::vector& options:: +man_prologue () const +{ + return this->man_prologue_; +} + +inline std::vector& options:: +man_prologue () +{ + return this->man_prologue_; +} + +inline void options:: +man_prologue (const std::vector& x) +{ + this->man_prologue_ = x; +} + +inline bool options:: +man_prologue_specified () const +{ + return this->man_prologue_specified_; +} + +inline void options:: +man_prologue_specified (bool x) +{ + this->man_prologue_specified_ = x; +} + +inline const std::vector& options:: +html_prologue () const +{ + return this->html_prologue_; +} + +inline std::vector& options:: +html_prologue () +{ + return this->html_prologue_; +} + +inline void options:: +html_prologue (const std::vector& x) +{ + this->html_prologue_ = x; +} + +inline bool options:: +html_prologue_specified () const +{ + return this->html_prologue_specified_; +} + +inline void options:: +html_prologue_specified (bool x) +{ + this->html_prologue_specified_ = x; +} + +inline const std::vector& options:: +txt_prologue () const +{ + return this->txt_prologue_; +} + +inline std::vector& options:: +txt_prologue () +{ + return this->txt_prologue_; +} + +inline void options:: +txt_prologue (const std::vector& x) +{ + this->txt_prologue_ = x; +} + +inline bool options:: +txt_prologue_specified () const +{ + return this->txt_prologue_specified_; +} + +inline void options:: +txt_prologue_specified (bool x) +{ + this->txt_prologue_specified_ = x; +} + +inline const std::vector& options:: +hxx_epilogue () const +{ + return this->hxx_epilogue_; +} + +inline std::vector& options:: +hxx_epilogue () +{ + return this->hxx_epilogue_; +} + +inline void options:: +hxx_epilogue (const std::vector& x) +{ + this->hxx_epilogue_ = x; +} + +inline bool options:: +hxx_epilogue_specified () const +{ + return this->hxx_epilogue_specified_; +} + +inline void options:: +hxx_epilogue_specified (bool x) +{ + this->hxx_epilogue_specified_ = x; +} + +inline const std::vector& options:: +ixx_epilogue () const +{ + return this->ixx_epilogue_; +} + +inline std::vector& options:: +ixx_epilogue () +{ + return this->ixx_epilogue_; +} + +inline void options:: +ixx_epilogue (const std::vector& x) +{ + this->ixx_epilogue_ = x; +} + +inline bool options:: +ixx_epilogue_specified () const +{ + return this->ixx_epilogue_specified_; +} + +inline void options:: +ixx_epilogue_specified (bool x) +{ + this->ixx_epilogue_specified_ = x; +} + +inline const std::vector& options:: +cxx_epilogue () const +{ + return this->cxx_epilogue_; +} + +inline std::vector& options:: +cxx_epilogue () +{ + return this->cxx_epilogue_; +} + +inline void options:: +cxx_epilogue (const std::vector& x) +{ + this->cxx_epilogue_ = x; +} + +inline bool options:: +cxx_epilogue_specified () const +{ + return this->cxx_epilogue_specified_; +} + +inline void options:: +cxx_epilogue_specified (bool x) +{ + this->cxx_epilogue_specified_ = x; +} + +inline const std::vector& options:: +man_epilogue () const +{ + return this->man_epilogue_; +} + +inline std::vector& options:: +man_epilogue () +{ + return this->man_epilogue_; +} + +inline void options:: +man_epilogue (const std::vector& x) +{ + this->man_epilogue_ = x; +} + +inline bool options:: +man_epilogue_specified () const +{ + return this->man_epilogue_specified_; +} + +inline void options:: +man_epilogue_specified (bool x) +{ + this->man_epilogue_specified_ = x; +} + +inline const std::vector& options:: +html_epilogue () const +{ + return this->html_epilogue_; +} + +inline std::vector& options:: +html_epilogue () +{ + return this->html_epilogue_; +} + +inline void options:: +html_epilogue (const std::vector& x) +{ + this->html_epilogue_ = x; +} + +inline bool options:: +html_epilogue_specified () const +{ + return this->html_epilogue_specified_; +} + +inline void options:: +html_epilogue_specified (bool x) +{ + this->html_epilogue_specified_ = x; +} + +inline const std::vector& options:: +txt_epilogue () const +{ + return this->txt_epilogue_; +} + +inline std::vector& options:: +txt_epilogue () +{ + return this->txt_epilogue_; +} + +inline void options:: +txt_epilogue (const std::vector& x) +{ + this->txt_epilogue_ = x; +} + +inline bool options:: +txt_epilogue_specified () const +{ + return this->txt_epilogue_specified_; +} + +inline void options:: +txt_epilogue_specified (bool x) +{ + this->txt_epilogue_specified_ = x; +} + +inline const std::string& options:: +hxx_prologue_file () const +{ + return this->hxx_prologue_file_; +} + +inline std::string& options:: +hxx_prologue_file () +{ + return this->hxx_prologue_file_; +} + +inline void options:: +hxx_prologue_file (const std::string& x) +{ + this->hxx_prologue_file_ = x; +} + +inline bool options:: +hxx_prologue_file_specified () const +{ + return this->hxx_prologue_file_specified_; +} + +inline void options:: +hxx_prologue_file_specified (bool x) +{ + this->hxx_prologue_file_specified_ = x; +} + +inline const std::string& options:: +ixx_prologue_file () const +{ + return this->ixx_prologue_file_; +} + +inline std::string& options:: +ixx_prologue_file () +{ + return this->ixx_prologue_file_; +} + +inline void options:: +ixx_prologue_file (const std::string& x) +{ + this->ixx_prologue_file_ = x; +} + +inline bool options:: +ixx_prologue_file_specified () const +{ + return this->ixx_prologue_file_specified_; +} + +inline void options:: +ixx_prologue_file_specified (bool x) +{ + this->ixx_prologue_file_specified_ = x; +} + +inline const std::string& options:: +cxx_prologue_file () const +{ + return this->cxx_prologue_file_; +} + +inline std::string& options:: +cxx_prologue_file () +{ + return this->cxx_prologue_file_; +} + +inline void options:: +cxx_prologue_file (const std::string& x) +{ + this->cxx_prologue_file_ = x; +} + +inline bool options:: +cxx_prologue_file_specified () const +{ + return this->cxx_prologue_file_specified_; +} + +inline void options:: +cxx_prologue_file_specified (bool x) +{ + this->cxx_prologue_file_specified_ = x; +} + +inline const std::string& options:: +man_prologue_file () const +{ + return this->man_prologue_file_; +} + +inline std::string& options:: +man_prologue_file () +{ + return this->man_prologue_file_; +} + +inline void options:: +man_prologue_file (const std::string& x) +{ + this->man_prologue_file_ = x; +} + +inline bool options:: +man_prologue_file_specified () const +{ + return this->man_prologue_file_specified_; +} + +inline void options:: +man_prologue_file_specified (bool x) +{ + this->man_prologue_file_specified_ = x; +} + +inline const std::string& options:: +html_prologue_file () const +{ + return this->html_prologue_file_; +} + +inline std::string& options:: +html_prologue_file () +{ + return this->html_prologue_file_; +} + +inline void options:: +html_prologue_file (const std::string& x) +{ + this->html_prologue_file_ = x; +} + +inline bool options:: +html_prologue_file_specified () const +{ + return this->html_prologue_file_specified_; +} + +inline void options:: +html_prologue_file_specified (bool x) +{ + this->html_prologue_file_specified_ = x; +} + +inline const std::string& options:: +txt_prologue_file () const +{ + return this->txt_prologue_file_; +} + +inline std::string& options:: +txt_prologue_file () +{ + return this->txt_prologue_file_; +} + +inline void options:: +txt_prologue_file (const std::string& x) +{ + this->txt_prologue_file_ = x; +} + +inline bool options:: +txt_prologue_file_specified () const +{ + return this->txt_prologue_file_specified_; +} + +inline void options:: +txt_prologue_file_specified (bool x) +{ + this->txt_prologue_file_specified_ = x; +} + +inline const std::string& options:: +hxx_epilogue_file () const +{ + return this->hxx_epilogue_file_; +} + +inline std::string& options:: +hxx_epilogue_file () +{ + return this->hxx_epilogue_file_; +} + +inline void options:: +hxx_epilogue_file (const std::string& x) +{ + this->hxx_epilogue_file_ = x; +} + +inline bool options:: +hxx_epilogue_file_specified () const +{ + return this->hxx_epilogue_file_specified_; +} + +inline void options:: +hxx_epilogue_file_specified (bool x) +{ + this->hxx_epilogue_file_specified_ = x; +} + +inline const std::string& options:: +ixx_epilogue_file () const +{ + return this->ixx_epilogue_file_; +} + +inline std::string& options:: +ixx_epilogue_file () +{ + return this->ixx_epilogue_file_; +} + +inline void options:: +ixx_epilogue_file (const std::string& x) +{ + this->ixx_epilogue_file_ = x; +} + +inline bool options:: +ixx_epilogue_file_specified () const +{ + return this->ixx_epilogue_file_specified_; +} + +inline void options:: +ixx_epilogue_file_specified (bool x) +{ + this->ixx_epilogue_file_specified_ = x; +} + +inline const std::string& options:: +cxx_epilogue_file () const +{ + return this->cxx_epilogue_file_; +} + +inline std::string& options:: +cxx_epilogue_file () +{ + return this->cxx_epilogue_file_; +} + +inline void options:: +cxx_epilogue_file (const std::string& x) +{ + this->cxx_epilogue_file_ = x; +} + +inline bool options:: +cxx_epilogue_file_specified () const +{ + return this->cxx_epilogue_file_specified_; +} + +inline void options:: +cxx_epilogue_file_specified (bool x) +{ + this->cxx_epilogue_file_specified_ = x; +} + +inline const std::string& options:: +man_epilogue_file () const +{ + return this->man_epilogue_file_; +} + +inline std::string& options:: +man_epilogue_file () +{ + return this->man_epilogue_file_; +} + +inline void options:: +man_epilogue_file (const std::string& x) +{ + this->man_epilogue_file_ = x; +} + +inline bool options:: +man_epilogue_file_specified () const +{ + return this->man_epilogue_file_specified_; +} + +inline void options:: +man_epilogue_file_specified (bool x) +{ + this->man_epilogue_file_specified_ = x; +} + +inline const std::string& options:: +html_epilogue_file () const +{ + return this->html_epilogue_file_; +} + +inline std::string& options:: +html_epilogue_file () +{ + return this->html_epilogue_file_; +} + +inline void options:: +html_epilogue_file (const std::string& x) +{ + this->html_epilogue_file_ = x; +} + +inline bool options:: +html_epilogue_file_specified () const +{ + return this->html_epilogue_file_specified_; +} + +inline void options:: +html_epilogue_file_specified (bool x) +{ + this->html_epilogue_file_specified_ = x; +} + +inline const std::string& options:: +txt_epilogue_file () const +{ + return this->txt_epilogue_file_; +} + +inline std::string& options:: +txt_epilogue_file () +{ + return this->txt_epilogue_file_; +} + +inline void options:: +txt_epilogue_file (const std::string& x) +{ + this->txt_epilogue_file_ = x; +} + +inline bool options:: +txt_epilogue_file_specified () const +{ + return this->txt_epilogue_file_specified_; +} + +inline void options:: +txt_epilogue_file_specified (bool x) +{ + this->txt_epilogue_file_specified_ = x; +} + +inline const std::string& options:: +output_prefix () const +{ + return this->output_prefix_; +} + +inline std::string& options:: +output_prefix () +{ + return this->output_prefix_; +} + +inline void options:: +output_prefix (const std::string& x) +{ + this->output_prefix_ = x; +} + +inline bool options:: +output_prefix_specified () const +{ + return this->output_prefix_specified_; +} + +inline void options:: +output_prefix_specified (bool x) +{ + this->output_prefix_specified_ = x; +} + +inline const std::string& options:: +output_suffix () const +{ + return this->output_suffix_; +} + +inline std::string& options:: +output_suffix () +{ + return this->output_suffix_; +} + +inline void options:: +output_suffix (const std::string& x) +{ + this->output_suffix_ = x; +} + +inline bool options:: +output_suffix_specified () const +{ + return this->output_suffix_specified_; +} + +inline void options:: +output_suffix_specified (bool x) +{ + this->output_suffix_specified_ = x; +} + +inline const std::string& options:: +hxx_suffix () const +{ + return this->hxx_suffix_; +} + +inline std::string& options:: +hxx_suffix () +{ + return this->hxx_suffix_; +} + +inline void options:: +hxx_suffix (const std::string& x) +{ + this->hxx_suffix_ = x; +} + +inline bool options:: +hxx_suffix_specified () const +{ + return this->hxx_suffix_specified_; +} + +inline void options:: +hxx_suffix_specified (bool x) +{ + this->hxx_suffix_specified_ = x; +} + +inline const std::string& options:: +ixx_suffix () const +{ + return this->ixx_suffix_; +} + +inline std::string& options:: +ixx_suffix () +{ + return this->ixx_suffix_; +} + +inline void options:: +ixx_suffix (const std::string& x) +{ + this->ixx_suffix_ = x; +} + +inline bool options:: +ixx_suffix_specified () const +{ + return this->ixx_suffix_specified_; +} + +inline void options:: +ixx_suffix_specified (bool x) +{ + this->ixx_suffix_specified_ = x; +} + +inline const std::string& options:: +cxx_suffix () const +{ + return this->cxx_suffix_; +} + +inline std::string& options:: +cxx_suffix () +{ + return this->cxx_suffix_; +} + +inline void options:: +cxx_suffix (const std::string& x) +{ + this->cxx_suffix_ = x; +} + +inline bool options:: +cxx_suffix_specified () const +{ + return this->cxx_suffix_specified_; +} + +inline void options:: +cxx_suffix_specified (bool x) +{ + this->cxx_suffix_specified_ = x; +} + +inline const std::string& options:: +man_suffix () const +{ + return this->man_suffix_; +} + +inline std::string& options:: +man_suffix () +{ + return this->man_suffix_; +} + +inline void options:: +man_suffix (const std::string& x) +{ + this->man_suffix_ = x; +} + +inline bool options:: +man_suffix_specified () const +{ + return this->man_suffix_specified_; +} + +inline void options:: +man_suffix_specified (bool x) +{ + this->man_suffix_specified_ = x; +} + +inline const std::string& options:: +html_suffix () const +{ + return this->html_suffix_; +} + +inline std::string& options:: +html_suffix () +{ + return this->html_suffix_; +} + +inline void options:: +html_suffix (const std::string& x) +{ + this->html_suffix_ = x; +} + +inline bool options:: +html_suffix_specified () const +{ + return this->html_suffix_specified_; +} + +inline void options:: +html_suffix_specified (bool x) +{ + this->html_suffix_specified_ = x; +} + +inline const std::string& options:: +txt_suffix () const +{ + return this->txt_suffix_; +} + +inline std::string& options:: +txt_suffix () +{ + return this->txt_suffix_; +} + +inline void options:: +txt_suffix (const std::string& x) +{ + this->txt_suffix_ = x; +} + +inline bool options:: +txt_suffix_specified () const +{ + return this->txt_suffix_specified_; +} + +inline void options:: +txt_suffix_specified (bool x) +{ + this->txt_suffix_specified_ = x; +} + +inline const std::string& options:: +option_prefix () const +{ + return this->option_prefix_; +} + +inline std::string& options:: +option_prefix () +{ + return this->option_prefix_; +} + +inline void options:: +option_prefix (const std::string& x) +{ + this->option_prefix_ = x; +} + +inline bool options:: +option_prefix_specified () const +{ + return this->option_prefix_specified_; +} + +inline void options:: +option_prefix_specified (bool x) +{ + this->option_prefix_specified_ = x; +} + +inline const std::string& options:: +option_separator () const +{ + return this->option_separator_; +} + +inline std::string& options:: +option_separator () +{ + return this->option_separator_; +} + +inline void options:: +option_separator (const std::string& x) +{ + this->option_separator_ = x; +} + +inline bool options:: +option_separator_specified () const +{ + return this->option_separator_specified_; +} + +inline void options:: +option_separator_specified (bool x) +{ + this->option_separator_specified_ = x; +} + +inline const bool& options:: +keep_separator () const +{ + return this->keep_separator_; +} + +inline bool& options:: +keep_separator () +{ + return this->keep_separator_; +} + +inline void options:: +keep_separator (const bool& x) +{ + this->keep_separator_ = x; +} + +inline const bool& options:: +no_combined_flags () const +{ + return this->no_combined_flags_; +} + +inline bool& options:: +no_combined_flags () +{ + return this->no_combined_flags_; +} + +inline void options:: +no_combined_flags (const bool& x) +{ + this->no_combined_flags_ = x; +} + +inline const bool& options:: +no_combined_values () const +{ + return this->no_combined_values_; +} + +inline bool& options:: +no_combined_values () +{ + return this->no_combined_values_; +} + +inline void options:: +no_combined_values (const bool& x) +{ + this->no_combined_values_ = x; +} + +inline const bool& options:: +include_with_brackets () const +{ + return this->include_with_brackets_; +} + +inline bool& options:: +include_with_brackets () +{ + return this->include_with_brackets_; +} + +inline void options:: +include_with_brackets (const bool& x) +{ + this->include_with_brackets_ = x; +} + +inline const std::string& options:: +include_prefix () const +{ + return this->include_prefix_; +} + +inline std::string& options:: +include_prefix () +{ + return this->include_prefix_; +} + +inline void options:: +include_prefix (const std::string& x) +{ + this->include_prefix_ = x; +} + +inline bool options:: +include_prefix_specified () const +{ + return this->include_prefix_specified_; +} + +inline void options:: +include_prefix_specified (bool x) +{ + this->include_prefix_specified_ = x; +} + +inline const std::string& options:: +guard_prefix () const +{ + return this->guard_prefix_; +} + +inline std::string& options:: +guard_prefix () +{ + return this->guard_prefix_; +} + +inline void options:: +guard_prefix (const std::string& x) +{ + this->guard_prefix_ = x; +} + +inline bool options:: +guard_prefix_specified () const +{ + return this->guard_prefix_specified_; +} + +inline void options:: +guard_prefix_specified (bool x) +{ + this->guard_prefix_specified_ = x; +} + +inline const std::map& options:: +reserved_name () const +{ + return this->reserved_name_; +} + +inline std::map& options:: +reserved_name () +{ + return this->reserved_name_; +} + +inline void options:: +reserved_name (const std::map& x) +{ + this->reserved_name_ = x; +} + +inline bool options:: +reserved_name_specified () const +{ + return this->reserved_name_specified_; +} + +inline void options:: +reserved_name_specified (bool x) +{ + this->reserved_name_specified_ = x; +} + +inline const std::string& options:: +options_file () const +{ + return this->options_file_; +} + +inline std::string& options:: +options_file () +{ + return this->options_file_; +} + +inline void options:: +options_file (const std::string& x) +{ + this->options_file_ = x; +} + +inline bool options:: +options_file_specified () const +{ + return this->options_file_specified_; +} + +inline void options:: +options_file_specified (bool x) +{ + this->options_file_specified_ = x; +} + +// Begin epilogue. +// +// +// End epilogue. diff --git a/cli/cli/buildfile b/cli/cli/buildfile index 2385a7d..dc5d75b 100644 --- a/cli/cli/buildfile +++ b/cli/cli/buildfile @@ -15,63 +15,119 @@ exe{cli}: cli.checksum = $version } -libue{cli}: {hxx ixx txx cxx}{** -cli -version -options -**.test...} \ - {hxx}{version} {hxx ixx cxx}{options} \ - $libs +hdr = {hxx ixx txx}{* -cli -version -options -*.test...} +src = cxx{* -cli -version -options -*.test...} + +all_s = semantics/{hxx ixx txx cxx}{*} +all_t = traversal/{hxx ixx txx cxx}{*} + +libue{cli}: $hdr $src $all_s $all_t {hxx}{version} $libs hxx{version}: in{version} $src_root/manifest -# Unit tests. +# Build options (both bootstrap and final version). # -exe{*.test}: +cxx.poptions =+ "-I$out_root" "-I$src_root" + +# Bootstrap. +# +# The plan is as follows: +# +# 1. Build the bootstrap version of cli using a copy of options.?xx saved in +# bootstrap/cli/. +# +# 2. Use that to re-generate options.?xx. If the result differs from the +# saved version, copy it over and fail the build, asking for a restart. +# +# 3. Otherwise, proceed to build the final version of cli. +# +if $config.cli.develop { - test = true - install = false -} + libue{cli}: {hxx ixx cxx}{options} -for t: cxx{**.test...} + bootstrap/ + { + # This should only apply to the bootstrap build. + # + cxx.poptions =+ "-I$src_base" # Note: must come first. + + cli/ + { + # Note: semantics/ and traversal/ do not include options.hxx so we can + # share their object files. + # + exe{cli}: obj{cli $name($src) options} ../../{$all_s $all_t} $libs + + for s: cli $name($src) + obj{$s}: ../../cxx{$s} $libs + + obj{options}: {hxx ixx cxx}{options} + + obj{cli}: cxx.poptions += -DCLI_BOOTSTRAP + } + } + + <{hxx ixx cxx}{options}>: cli{options} bootstrap/cli/exe{cli} + { + options = --include-with-brackets --include-prefix cli \ + --guard-prefix CLI --generate-file-scanner \ + --generate-specifier --generate-modifier \ + --suppress-undocumented --reserved-name stdout + + # Symlink the generated code in src for convenience of development. + # + backlink = true + } + {{ + diag cli ($<[0]) + ($<[1]) $options -o $out_base $path($<[0]) + + # If the result differs from the bootstrap version, copy it over and + # request the build restart. + # + if diff $src_base/bootstrap/cli/options.hxx $path($>[0]) >- && \ + diff $src_base/bootstrap/cli/options.ixx $path($>[1]) >- && \ + diff $src_base/bootstrap/cli/options.cxx $path($>[2]) >- + exit + end + + cp $path($>[0]) $src_base/bootstrap/cli/options.hxx + cp $path($>[1]) $src_base/bootstrap/cli/options.ixx + cp $path($>[2]) $src_base/bootstrap/cli/options.cxx + + exit "bootstrap options.?xx have changed, restart the build" + }} +} +else { - d = $directory($t) - n = $name($t)... + # Use bootstrap options.?xx to build the final version of cli. + # + libue{cli}: bootstrap/cli/{hxx ixx cxx}{options} + cxx.poptions =+ "-I($src_base/bootstrap)" # Note: must come first. - ./: $d/exe{$n}: $t $d/{hxx ixx txx}{+$n} $d/testscript{+$n} - $d/exe{$n}: libue{cli}: bin.whole = false + ./: cli{options} # Keep in distribution. } -# Build options. +# Build options (final version only). # + # Pass the copyright notice extracted from the LICENSE file. # -copyright = $process.run_regex(cat $src_root/LICENSE, \ - 'Copyright \(c\) (.+)\.', \ - '\1') - obj{cli}: cxx.poptions += -DCLI_COPYRIGHT=\"$copyright\" -# Generated options parsing code. -# -# @@ This will eventually be replaced with an ah hoc recipe. +# Unit tests. # -if ($config.cli != [null] && $config.cli != false) +exe{*.test}: { - cli.cxx{options}: cli{options} - - cli.options += --include-with-brackets --include-prefix cli \ ---guard-prefix CLI --generate-file-scanner --generate-specifier \ ---generate-modifier --suppress-undocumented --reserved-name stdout + test = true + install = false +} - cli.cxx{*}: - { - # Include the generated cli files into the distribution and don't remove - # them when cleaning in src (so that clean results in a state identical to - # distributed). - # - dist = true - clean = ($src_root != $out_root) +for t: cxx{**.test...} +{ + d = $directory($t) + n = $name($t)... - # We keep the generated code in the repository so copy it back to src - # in case of a forwarded configuration. - # - backlink = overwrite - } + ./: $d/exe{$n}: $t $d/{hxx ixx txx}{+$n} $d/testscript{+$n} + $d/exe{$n}: libue{cli}: bin.whole = false } diff --git a/cli/cli/cli.cxx b/cli/cli/cli.cxx index 11cf6c0..f1196de 100644 --- a/cli/cli/cli.cxx +++ b/cli/cli/cli.cxx @@ -16,7 +16,13 @@ #include #include -#include +#ifndef CLI_BOOTSTRAP +# include +#else +# define CLI_VERSION_ID 0 +# define CLI_VERSION_FULL 0 +# define CLI_COPYRIGHT "" +#endif using namespace std; using namespace cutl; diff --git a/cli/cli/options.cxx b/cli/cli/options.cxx deleted file mode 100644 index 0f0604a..0000000 --- a/cli/cli/options.cxx +++ /dev/null @@ -1,2168 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -// Begin prologue. -// -// -// End prologue. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace cli -{ - // unknown_option - // - unknown_option:: - ~unknown_option () throw () - { - } - - void unknown_option:: - print (::std::ostream& os) const - { - os << "unknown option '" << option ().c_str () << "'"; - } - - const char* unknown_option:: - what () const throw () - { - return "unknown option"; - } - - // unknown_argument - // - unknown_argument:: - ~unknown_argument () throw () - { - } - - void unknown_argument:: - print (::std::ostream& os) const - { - os << "unknown argument '" << argument ().c_str () << "'"; - } - - const char* unknown_argument:: - what () const throw () - { - return "unknown argument"; - } - - // missing_value - // - missing_value:: - ~missing_value () throw () - { - } - - void missing_value:: - print (::std::ostream& os) const - { - os << "missing value for option '" << option ().c_str () << "'"; - } - - const char* missing_value:: - what () const throw () - { - return "missing option value"; - } - - // invalid_value - // - invalid_value:: - ~invalid_value () throw () - { - } - - void invalid_value:: - print (::std::ostream& os) const - { - os << "invalid value '" << value ().c_str () << "' for option '" - << option ().c_str () << "'"; - - if (!message ().empty ()) - os << ": " << message ().c_str (); - } - - const char* invalid_value:: - what () const throw () - { - return "invalid option value"; - } - - // eos_reached - // - void eos_reached:: - print (::std::ostream& os) const - { - os << what (); - } - - const char* eos_reached:: - what () const throw () - { - return "end of argument stream reached"; - } - - // file_io_failure - // - file_io_failure:: - ~file_io_failure () throw () - { - } - - void file_io_failure:: - print (::std::ostream& os) const - { - os << "unable to open file '" << file ().c_str () << "' or read failure"; - } - - const char* file_io_failure:: - what () const throw () - { - return "unable to open file or read failure"; - } - - // unmatched_quote - // - unmatched_quote:: - ~unmatched_quote () throw () - { - } - - void unmatched_quote:: - print (::std::ostream& os) const - { - os << "unmatched quote in argument '" << argument ().c_str () << "'"; - } - - const char* unmatched_quote:: - what () const throw () - { - return "unmatched quote"; - } - - // scanner - // - scanner:: - ~scanner () - { - } - - // argv_scanner - // - bool argv_scanner:: - more () - { - return i_ < argc_; - } - - const char* argv_scanner:: - peek () - { - if (i_ < argc_) - return argv_[i_]; - else - throw eos_reached (); - } - - const char* argv_scanner:: - next () - { - if (i_ < argc_) - { - const char* r (argv_[i_]); - - if (erase_) - { - for (int i (i_ + 1); i < argc_; ++i) - argv_[i - 1] = argv_[i]; - - --argc_; - argv_[argc_] = 0; - } - else - ++i_; - - return r; - } - else - throw eos_reached (); - } - - void argv_scanner:: - skip () - { - if (i_ < argc_) - ++i_; - else - throw eos_reached (); - } - - // argv_file_scanner - // - int argv_file_scanner::zero_argc_ = 0; - std::string argv_file_scanner::empty_string_; - - bool argv_file_scanner:: - more () - { - if (!args_.empty ()) - return true; - - while (base::more ()) - { - // See if the next argument is the file option. - // - const char* a (base::peek ()); - const option_info* oi = 0; - const char* ov = 0; - - if (!skip_) - { - if ((oi = find (a)) != 0) - { - base::next (); - - if (!base::more ()) - throw missing_value (a); - - ov = base::next (); - } - else if (std::strncmp (a, "-", 1) == 0) - { - if ((ov = std::strchr (a, '=')) != 0) - { - std::string o (a, 0, ov - a); - if ((oi = find (o.c_str ())) != 0) - { - base::next (); - ++ov; - } - } - } - } - - if (oi != 0) - { - if (oi->search_func != 0) - { - std::string f (oi->search_func (ov, oi->arg)); - - if (!f.empty ()) - load (f); - } - else - load (ov); - - if (!args_.empty ()) - return true; - } - else - { - if (!skip_) - skip_ = (std::strcmp (a, "--") == 0); - - return true; - } - } - - return false; - } - - const char* argv_file_scanner:: - peek () - { - if (!more ()) - throw eos_reached (); - - return args_.empty () ? base::peek () : args_.front ().value.c_str (); - } - - const std::string& argv_file_scanner:: - peek_file () - { - if (!more ()) - throw eos_reached (); - - return args_.empty () ? empty_string_ : *args_.front ().file; - } - - std::size_t argv_file_scanner:: - peek_line () - { - if (!more ()) - throw eos_reached (); - - return args_.empty () ? 0 : args_.front ().line; - } - - const char* argv_file_scanner:: - next () - { - if (!more ()) - throw eos_reached (); - - if (args_.empty ()) - return base::next (); - else - { - hold_[i_ == 0 ? ++i_ : --i_].swap (args_.front ().value); - args_.pop_front (); - return hold_[i_].c_str (); - } - } - - void argv_file_scanner:: - skip () - { - if (!more ()) - throw eos_reached (); - - if (args_.empty ()) - return base::skip (); - else - args_.pop_front (); - } - - const argv_file_scanner::option_info* argv_file_scanner:: - find (const char* a) const - { - for (std::size_t i (0); i < options_count_; ++i) - if (std::strcmp (a, options_[i].option) == 0) - return &options_[i]; - - return 0; - } - - void argv_file_scanner:: - load (const std::string& file) - { - using namespace std; - - ifstream is (file.c_str ()); - - if (!is.is_open ()) - throw file_io_failure (file); - - files_.push_back (file); - - arg a; - a.file = &*files_.rbegin (); - - for (a.line = 1; !is.eof (); ++a.line) - { - string line; - getline (is, line); - - if (is.fail () && !is.eof ()) - throw file_io_failure (file); - - string::size_type n (line.size ()); - - // Trim the line from leading and trailing whitespaces. - // - if (n != 0) - { - const char* f (line.c_str ()); - const char* l (f + n); - - const char* of (f); - while (f < l && (*f == ' ' || *f == '\t' || *f == '\r')) - ++f; - - --l; - - const char* ol (l); - while (l > f && (*l == ' ' || *l == '\t' || *l == '\r')) - --l; - - if (f != of || l != ol) - line = f <= l ? string (f, l - f + 1) : string (); - } - - // Ignore empty lines, those that start with #. - // - if (line.empty () || line[0] == '#') - continue; - - string::size_type p (string::npos); - if (line.compare (0, 1, "-") == 0) - { - p = line.find (' '); - - string::size_type q (line.find ('=')); - if (q != string::npos && q < p) - p = q; - } - - string s1; - if (p != string::npos) - { - s1.assign (line, 0, p); - - // Skip leading whitespaces in the argument. - // - if (line[p] == '=') - ++p; - else - { - n = line.size (); - for (++p; p < n; ++p) - { - char c (line[p]); - if (c != ' ' && c != '\t' && c != '\r') - break; - } - } - } - else if (!skip_) - skip_ = (line == "--"); - - string s2 (line, p != string::npos ? p : 0); - - // If the string (which is an option value or argument) is - // wrapped in quotes, remove them. - // - n = s2.size (); - char cf (s2[0]), cl (s2[n - 1]); - - if (cf == '"' || cf == '\'' || cl == '"' || cl == '\'') - { - if (n == 1 || cf != cl) - throw unmatched_quote (s2); - - s2 = string (s2, 1, n - 2); - } - - if (!s1.empty ()) - { - // See if this is another file option. - // - const option_info* oi; - if (!skip_ && (oi = find (s1.c_str ()))) - { - if (s2.empty ()) - throw missing_value (oi->option); - - if (oi->search_func != 0) - { - string f (oi->search_func (s2.c_str (), oi->arg)); - if (!f.empty ()) - load (f); - } - else - { - // If the path of the file being parsed is not simple and the - // path of the file that needs to be loaded is relative, then - // complete the latter using the former as a base. - // -#ifndef _WIN32 - string::size_type p (file.find_last_of ('/')); - bool c (p != string::npos && s2[0] != '/'); -#else - string::size_type p (file.find_last_of ("/\\")); - bool c (p != string::npos && s2[1] != ':'); -#endif - if (c) - s2.insert (0, file, 0, p + 1); - - load (s2); - } - - continue; - } - - a.value = s1; - args_.push_back (a); - } - - a.value = s2; - args_.push_back (a); - } - } - - template - struct parser - { - static void - parse (X& x, bool& xs, scanner& s) - { - using namespace std; - - const char* o (s.next ()); - if (s.more ()) - { - string v (s.next ()); - istringstream is (v); - if (!(is >> x && is.peek () == istringstream::traits_type::eof ())) - throw invalid_value (o, v); - } - else - throw missing_value (o); - - xs = true; - } - }; - - template <> - struct parser - { - static void - parse (bool& x, scanner& s) - { - s.next (); - x = true; - } - }; - - template <> - struct parser - { - static void - parse (std::string& x, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - x = s.next (); - else - throw missing_value (o); - - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::vector& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.push_back (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::set& c, bool& xs, scanner& s) - { - X x; - bool dummy; - parser::parse (x, dummy, s); - c.insert (x); - xs = true; - } - }; - - template - struct parser > - { - static void - parse (std::map& m, bool& xs, scanner& s) - { - const char* o (s.next ()); - - if (s.more ()) - { - std::string ov (s.next ()); - std::string::size_type p = ov.find ('='); - - K k = K (); - V v = V (); - std::string kstr (ov, 0, p); - std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); - - int ac (2); - char* av[] = - { - const_cast (o), - 0 - }; - - bool dummy; - if (!kstr.empty ()) - { - av[1] = const_cast (kstr.c_str ()); - argv_scanner s (0, ac, av); - parser::parse (k, dummy, s); - } - - if (!vstr.empty ()) - { - av[1] = const_cast (vstr.c_str ()); - argv_scanner s (0, ac, av); - parser::parse (v, dummy, s); - } - - m[k] = v; - } - else - throw missing_value (o); - - xs = true; - } - }; - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, s); - } - - template - void - thunk (X& x, scanner& s) - { - parser::parse (x.*M, x.*S, s); - } -} - -#include -#include - -// options -// - -options:: -options () -: build2_metadata_ (), - build2_metadata_specified_ (false), - help_ (), - version_ (), - include_path_ (), - include_path_specified_ (false), - output_dir_ (), - output_dir_specified_ (false), - std_ (cxx_version::cxx98), - std_specified_ (false), - generate_modifier_ (), - generate_specifier_ (), - generate_parse_ (), - generate_merge_ (), - generate_description_ (), - generate_file_scanner_ (), - generate_vector_scanner_ (), - generate_group_scanner_ (), - suppress_inline_ (), - suppress_cli_ (), - cli_namespace_ ("::cli"), - cli_namespace_specified_ (false), - ostream_type_ ("::std::ostream"), - ostream_type_specified_ (false), - generate_cxx_ (), - generate_man_ (), - generate_html_ (), - generate_txt_ (), - stdout__ (), - suppress_undocumented_ (), - suppress_usage_ (), - long_usage_ (), - short_usage_ (), - page_usage_ (), - page_usage_specified_ (false), - option_length_ (0), - option_length_specified_ (false), - ansi_color_ (), - exclude_base_ (), - include_base_last_ (), - class_doc_ (), - class_doc_specified_ (false), - class__ (), - class__specified_ (false), - docvar_ (), - docvar_specified_ (false), - link_regex_ (), - link_regex_specified_ (false), - link_regex_trace_ (), - html_heading_map_ (), - html_heading_map_specified_ (false), - omit_link_check_ (), - hxx_prologue_ (), - hxx_prologue_specified_ (false), - ixx_prologue_ (), - ixx_prologue_specified_ (false), - cxx_prologue_ (), - cxx_prologue_specified_ (false), - man_prologue_ (), - man_prologue_specified_ (false), - html_prologue_ (), - html_prologue_specified_ (false), - txt_prologue_ (), - txt_prologue_specified_ (false), - hxx_epilogue_ (), - hxx_epilogue_specified_ (false), - ixx_epilogue_ (), - ixx_epilogue_specified_ (false), - cxx_epilogue_ (), - cxx_epilogue_specified_ (false), - man_epilogue_ (), - man_epilogue_specified_ (false), - html_epilogue_ (), - html_epilogue_specified_ (false), - txt_epilogue_ (), - txt_epilogue_specified_ (false), - hxx_prologue_file_ (), - hxx_prologue_file_specified_ (false), - ixx_prologue_file_ (), - ixx_prologue_file_specified_ (false), - cxx_prologue_file_ (), - cxx_prologue_file_specified_ (false), - man_prologue_file_ (), - man_prologue_file_specified_ (false), - html_prologue_file_ (), - html_prologue_file_specified_ (false), - txt_prologue_file_ (), - txt_prologue_file_specified_ (false), - hxx_epilogue_file_ (), - hxx_epilogue_file_specified_ (false), - ixx_epilogue_file_ (), - ixx_epilogue_file_specified_ (false), - cxx_epilogue_file_ (), - cxx_epilogue_file_specified_ (false), - man_epilogue_file_ (), - man_epilogue_file_specified_ (false), - html_epilogue_file_ (), - html_epilogue_file_specified_ (false), - txt_epilogue_file_ (), - txt_epilogue_file_specified_ (false), - output_prefix_ (), - output_prefix_specified_ (false), - output_suffix_ (), - output_suffix_specified_ (false), - hxx_suffix_ (".hxx"), - hxx_suffix_specified_ (false), - ixx_suffix_ (".ixx"), - ixx_suffix_specified_ (false), - cxx_suffix_ (".cxx"), - cxx_suffix_specified_ (false), - man_suffix_ (".1"), - man_suffix_specified_ (false), - html_suffix_ (".html"), - html_suffix_specified_ (false), - txt_suffix_ (".txt"), - txt_suffix_specified_ (false), - option_prefix_ ("-"), - option_prefix_specified_ (false), - option_separator_ ("--"), - option_separator_specified_ (false), - keep_separator_ (), - no_combined_flags_ (), - no_combined_values_ (), - include_with_brackets_ (), - include_prefix_ (), - include_prefix_specified_ (false), - guard_prefix_ (), - guard_prefix_specified_ (false), - reserved_name_ (), - reserved_name_specified_ (false), - options_file_ (), - options_file_specified_ (false) -{ -} - -options:: -options (int& argc, - char** argv, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) -: build2_metadata_ (), - build2_metadata_specified_ (false), - help_ (), - version_ (), - include_path_ (), - include_path_specified_ (false), - output_dir_ (), - output_dir_specified_ (false), - std_ (cxx_version::cxx98), - std_specified_ (false), - generate_modifier_ (), - generate_specifier_ (), - generate_parse_ (), - generate_merge_ (), - generate_description_ (), - generate_file_scanner_ (), - generate_vector_scanner_ (), - generate_group_scanner_ (), - suppress_inline_ (), - suppress_cli_ (), - cli_namespace_ ("::cli"), - cli_namespace_specified_ (false), - ostream_type_ ("::std::ostream"), - ostream_type_specified_ (false), - generate_cxx_ (), - generate_man_ (), - generate_html_ (), - generate_txt_ (), - stdout__ (), - suppress_undocumented_ (), - suppress_usage_ (), - long_usage_ (), - short_usage_ (), - page_usage_ (), - page_usage_specified_ (false), - option_length_ (0), - option_length_specified_ (false), - ansi_color_ (), - exclude_base_ (), - include_base_last_ (), - class_doc_ (), - class_doc_specified_ (false), - class__ (), - class__specified_ (false), - docvar_ (), - docvar_specified_ (false), - link_regex_ (), - link_regex_specified_ (false), - link_regex_trace_ (), - html_heading_map_ (), - html_heading_map_specified_ (false), - omit_link_check_ (), - hxx_prologue_ (), - hxx_prologue_specified_ (false), - ixx_prologue_ (), - ixx_prologue_specified_ (false), - cxx_prologue_ (), - cxx_prologue_specified_ (false), - man_prologue_ (), - man_prologue_specified_ (false), - html_prologue_ (), - html_prologue_specified_ (false), - txt_prologue_ (), - txt_prologue_specified_ (false), - hxx_epilogue_ (), - hxx_epilogue_specified_ (false), - ixx_epilogue_ (), - ixx_epilogue_specified_ (false), - cxx_epilogue_ (), - cxx_epilogue_specified_ (false), - man_epilogue_ (), - man_epilogue_specified_ (false), - html_epilogue_ (), - html_epilogue_specified_ (false), - txt_epilogue_ (), - txt_epilogue_specified_ (false), - hxx_prologue_file_ (), - hxx_prologue_file_specified_ (false), - ixx_prologue_file_ (), - ixx_prologue_file_specified_ (false), - cxx_prologue_file_ (), - cxx_prologue_file_specified_ (false), - man_prologue_file_ (), - man_prologue_file_specified_ (false), - html_prologue_file_ (), - html_prologue_file_specified_ (false), - txt_prologue_file_ (), - txt_prologue_file_specified_ (false), - hxx_epilogue_file_ (), - hxx_epilogue_file_specified_ (false), - ixx_epilogue_file_ (), - ixx_epilogue_file_specified_ (false), - cxx_epilogue_file_ (), - cxx_epilogue_file_specified_ (false), - man_epilogue_file_ (), - man_epilogue_file_specified_ (false), - html_epilogue_file_ (), - html_epilogue_file_specified_ (false), - txt_epilogue_file_ (), - txt_epilogue_file_specified_ (false), - output_prefix_ (), - output_prefix_specified_ (false), - output_suffix_ (), - output_suffix_specified_ (false), - hxx_suffix_ (".hxx"), - hxx_suffix_specified_ (false), - ixx_suffix_ (".ixx"), - ixx_suffix_specified_ (false), - cxx_suffix_ (".cxx"), - cxx_suffix_specified_ (false), - man_suffix_ (".1"), - man_suffix_specified_ (false), - html_suffix_ (".html"), - html_suffix_specified_ (false), - txt_suffix_ (".txt"), - txt_suffix_specified_ (false), - option_prefix_ ("-"), - option_prefix_specified_ (false), - option_separator_ ("--"), - option_separator_specified_ (false), - keep_separator_ (), - no_combined_flags_ (), - no_combined_values_ (), - include_with_brackets_ (), - include_prefix_ (), - include_prefix_specified_ (false), - guard_prefix_ (), - guard_prefix_specified_ (false), - reserved_name_ (), - reserved_name_specified_ (false), - options_file_ (), - options_file_specified_ (false) -{ - ::cli::argv_scanner s (argc, argv, erase); - _parse (s, opt, arg); -} - -options:: -options (int start, - int& argc, - char** argv, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) -: build2_metadata_ (), - build2_metadata_specified_ (false), - help_ (), - version_ (), - include_path_ (), - include_path_specified_ (false), - output_dir_ (), - output_dir_specified_ (false), - std_ (cxx_version::cxx98), - std_specified_ (false), - generate_modifier_ (), - generate_specifier_ (), - generate_parse_ (), - generate_merge_ (), - generate_description_ (), - generate_file_scanner_ (), - generate_vector_scanner_ (), - generate_group_scanner_ (), - suppress_inline_ (), - suppress_cli_ (), - cli_namespace_ ("::cli"), - cli_namespace_specified_ (false), - ostream_type_ ("::std::ostream"), - ostream_type_specified_ (false), - generate_cxx_ (), - generate_man_ (), - generate_html_ (), - generate_txt_ (), - stdout__ (), - suppress_undocumented_ (), - suppress_usage_ (), - long_usage_ (), - short_usage_ (), - page_usage_ (), - page_usage_specified_ (false), - option_length_ (0), - option_length_specified_ (false), - ansi_color_ (), - exclude_base_ (), - include_base_last_ (), - class_doc_ (), - class_doc_specified_ (false), - class__ (), - class__specified_ (false), - docvar_ (), - docvar_specified_ (false), - link_regex_ (), - link_regex_specified_ (false), - link_regex_trace_ (), - html_heading_map_ (), - html_heading_map_specified_ (false), - omit_link_check_ (), - hxx_prologue_ (), - hxx_prologue_specified_ (false), - ixx_prologue_ (), - ixx_prologue_specified_ (false), - cxx_prologue_ (), - cxx_prologue_specified_ (false), - man_prologue_ (), - man_prologue_specified_ (false), - html_prologue_ (), - html_prologue_specified_ (false), - txt_prologue_ (), - txt_prologue_specified_ (false), - hxx_epilogue_ (), - hxx_epilogue_specified_ (false), - ixx_epilogue_ (), - ixx_epilogue_specified_ (false), - cxx_epilogue_ (), - cxx_epilogue_specified_ (false), - man_epilogue_ (), - man_epilogue_specified_ (false), - html_epilogue_ (), - html_epilogue_specified_ (false), - txt_epilogue_ (), - txt_epilogue_specified_ (false), - hxx_prologue_file_ (), - hxx_prologue_file_specified_ (false), - ixx_prologue_file_ (), - ixx_prologue_file_specified_ (false), - cxx_prologue_file_ (), - cxx_prologue_file_specified_ (false), - man_prologue_file_ (), - man_prologue_file_specified_ (false), - html_prologue_file_ (), - html_prologue_file_specified_ (false), - txt_prologue_file_ (), - txt_prologue_file_specified_ (false), - hxx_epilogue_file_ (), - hxx_epilogue_file_specified_ (false), - ixx_epilogue_file_ (), - ixx_epilogue_file_specified_ (false), - cxx_epilogue_file_ (), - cxx_epilogue_file_specified_ (false), - man_epilogue_file_ (), - man_epilogue_file_specified_ (false), - html_epilogue_file_ (), - html_epilogue_file_specified_ (false), - txt_epilogue_file_ (), - txt_epilogue_file_specified_ (false), - output_prefix_ (), - output_prefix_specified_ (false), - output_suffix_ (), - output_suffix_specified_ (false), - hxx_suffix_ (".hxx"), - hxx_suffix_specified_ (false), - ixx_suffix_ (".ixx"), - ixx_suffix_specified_ (false), - cxx_suffix_ (".cxx"), - cxx_suffix_specified_ (false), - man_suffix_ (".1"), - man_suffix_specified_ (false), - html_suffix_ (".html"), - html_suffix_specified_ (false), - txt_suffix_ (".txt"), - txt_suffix_specified_ (false), - option_prefix_ ("-"), - option_prefix_specified_ (false), - option_separator_ ("--"), - option_separator_specified_ (false), - keep_separator_ (), - no_combined_flags_ (), - no_combined_values_ (), - include_with_brackets_ (), - include_prefix_ (), - include_prefix_specified_ (false), - guard_prefix_ (), - guard_prefix_specified_ (false), - reserved_name_ (), - reserved_name_specified_ (false), - options_file_ (), - options_file_specified_ (false) -{ - ::cli::argv_scanner s (start, argc, argv, erase); - _parse (s, opt, arg); -} - -options:: -options (int& argc, - char** argv, - int& end, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) -: build2_metadata_ (), - build2_metadata_specified_ (false), - help_ (), - version_ (), - include_path_ (), - include_path_specified_ (false), - output_dir_ (), - output_dir_specified_ (false), - std_ (cxx_version::cxx98), - std_specified_ (false), - generate_modifier_ (), - generate_specifier_ (), - generate_parse_ (), - generate_merge_ (), - generate_description_ (), - generate_file_scanner_ (), - generate_vector_scanner_ (), - generate_group_scanner_ (), - suppress_inline_ (), - suppress_cli_ (), - cli_namespace_ ("::cli"), - cli_namespace_specified_ (false), - ostream_type_ ("::std::ostream"), - ostream_type_specified_ (false), - generate_cxx_ (), - generate_man_ (), - generate_html_ (), - generate_txt_ (), - stdout__ (), - suppress_undocumented_ (), - suppress_usage_ (), - long_usage_ (), - short_usage_ (), - page_usage_ (), - page_usage_specified_ (false), - option_length_ (0), - option_length_specified_ (false), - ansi_color_ (), - exclude_base_ (), - include_base_last_ (), - class_doc_ (), - class_doc_specified_ (false), - class__ (), - class__specified_ (false), - docvar_ (), - docvar_specified_ (false), - link_regex_ (), - link_regex_specified_ (false), - link_regex_trace_ (), - html_heading_map_ (), - html_heading_map_specified_ (false), - omit_link_check_ (), - hxx_prologue_ (), - hxx_prologue_specified_ (false), - ixx_prologue_ (), - ixx_prologue_specified_ (false), - cxx_prologue_ (), - cxx_prologue_specified_ (false), - man_prologue_ (), - man_prologue_specified_ (false), - html_prologue_ (), - html_prologue_specified_ (false), - txt_prologue_ (), - txt_prologue_specified_ (false), - hxx_epilogue_ (), - hxx_epilogue_specified_ (false), - ixx_epilogue_ (), - ixx_epilogue_specified_ (false), - cxx_epilogue_ (), - cxx_epilogue_specified_ (false), - man_epilogue_ (), - man_epilogue_specified_ (false), - html_epilogue_ (), - html_epilogue_specified_ (false), - txt_epilogue_ (), - txt_epilogue_specified_ (false), - hxx_prologue_file_ (), - hxx_prologue_file_specified_ (false), - ixx_prologue_file_ (), - ixx_prologue_file_specified_ (false), - cxx_prologue_file_ (), - cxx_prologue_file_specified_ (false), - man_prologue_file_ (), - man_prologue_file_specified_ (false), - html_prologue_file_ (), - html_prologue_file_specified_ (false), - txt_prologue_file_ (), - txt_prologue_file_specified_ (false), - hxx_epilogue_file_ (), - hxx_epilogue_file_specified_ (false), - ixx_epilogue_file_ (), - ixx_epilogue_file_specified_ (false), - cxx_epilogue_file_ (), - cxx_epilogue_file_specified_ (false), - man_epilogue_file_ (), - man_epilogue_file_specified_ (false), - html_epilogue_file_ (), - html_epilogue_file_specified_ (false), - txt_epilogue_file_ (), - txt_epilogue_file_specified_ (false), - output_prefix_ (), - output_prefix_specified_ (false), - output_suffix_ (), - output_suffix_specified_ (false), - hxx_suffix_ (".hxx"), - hxx_suffix_specified_ (false), - ixx_suffix_ (".ixx"), - ixx_suffix_specified_ (false), - cxx_suffix_ (".cxx"), - cxx_suffix_specified_ (false), - man_suffix_ (".1"), - man_suffix_specified_ (false), - html_suffix_ (".html"), - html_suffix_specified_ (false), - txt_suffix_ (".txt"), - txt_suffix_specified_ (false), - option_prefix_ ("-"), - option_prefix_specified_ (false), - option_separator_ ("--"), - option_separator_specified_ (false), - keep_separator_ (), - no_combined_flags_ (), - no_combined_values_ (), - include_with_brackets_ (), - include_prefix_ (), - include_prefix_specified_ (false), - guard_prefix_ (), - guard_prefix_specified_ (false), - reserved_name_ (), - reserved_name_specified_ (false), - options_file_ (), - options_file_specified_ (false) -{ - ::cli::argv_scanner s (argc, argv, erase); - _parse (s, opt, arg); - end = s.end (); -} - -options:: -options (int start, - int& argc, - char** argv, - int& end, - bool erase, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) -: build2_metadata_ (), - build2_metadata_specified_ (false), - help_ (), - version_ (), - include_path_ (), - include_path_specified_ (false), - output_dir_ (), - output_dir_specified_ (false), - std_ (cxx_version::cxx98), - std_specified_ (false), - generate_modifier_ (), - generate_specifier_ (), - generate_parse_ (), - generate_merge_ (), - generate_description_ (), - generate_file_scanner_ (), - generate_vector_scanner_ (), - generate_group_scanner_ (), - suppress_inline_ (), - suppress_cli_ (), - cli_namespace_ ("::cli"), - cli_namespace_specified_ (false), - ostream_type_ ("::std::ostream"), - ostream_type_specified_ (false), - generate_cxx_ (), - generate_man_ (), - generate_html_ (), - generate_txt_ (), - stdout__ (), - suppress_undocumented_ (), - suppress_usage_ (), - long_usage_ (), - short_usage_ (), - page_usage_ (), - page_usage_specified_ (false), - option_length_ (0), - option_length_specified_ (false), - ansi_color_ (), - exclude_base_ (), - include_base_last_ (), - class_doc_ (), - class_doc_specified_ (false), - class__ (), - class__specified_ (false), - docvar_ (), - docvar_specified_ (false), - link_regex_ (), - link_regex_specified_ (false), - link_regex_trace_ (), - html_heading_map_ (), - html_heading_map_specified_ (false), - omit_link_check_ (), - hxx_prologue_ (), - hxx_prologue_specified_ (false), - ixx_prologue_ (), - ixx_prologue_specified_ (false), - cxx_prologue_ (), - cxx_prologue_specified_ (false), - man_prologue_ (), - man_prologue_specified_ (false), - html_prologue_ (), - html_prologue_specified_ (false), - txt_prologue_ (), - txt_prologue_specified_ (false), - hxx_epilogue_ (), - hxx_epilogue_specified_ (false), - ixx_epilogue_ (), - ixx_epilogue_specified_ (false), - cxx_epilogue_ (), - cxx_epilogue_specified_ (false), - man_epilogue_ (), - man_epilogue_specified_ (false), - html_epilogue_ (), - html_epilogue_specified_ (false), - txt_epilogue_ (), - txt_epilogue_specified_ (false), - hxx_prologue_file_ (), - hxx_prologue_file_specified_ (false), - ixx_prologue_file_ (), - ixx_prologue_file_specified_ (false), - cxx_prologue_file_ (), - cxx_prologue_file_specified_ (false), - man_prologue_file_ (), - man_prologue_file_specified_ (false), - html_prologue_file_ (), - html_prologue_file_specified_ (false), - txt_prologue_file_ (), - txt_prologue_file_specified_ (false), - hxx_epilogue_file_ (), - hxx_epilogue_file_specified_ (false), - ixx_epilogue_file_ (), - ixx_epilogue_file_specified_ (false), - cxx_epilogue_file_ (), - cxx_epilogue_file_specified_ (false), - man_epilogue_file_ (), - man_epilogue_file_specified_ (false), - html_epilogue_file_ (), - html_epilogue_file_specified_ (false), - txt_epilogue_file_ (), - txt_epilogue_file_specified_ (false), - output_prefix_ (), - output_prefix_specified_ (false), - output_suffix_ (), - output_suffix_specified_ (false), - hxx_suffix_ (".hxx"), - hxx_suffix_specified_ (false), - ixx_suffix_ (".ixx"), - ixx_suffix_specified_ (false), - cxx_suffix_ (".cxx"), - cxx_suffix_specified_ (false), - man_suffix_ (".1"), - man_suffix_specified_ (false), - html_suffix_ (".html"), - html_suffix_specified_ (false), - txt_suffix_ (".txt"), - txt_suffix_specified_ (false), - option_prefix_ ("-"), - option_prefix_specified_ (false), - option_separator_ ("--"), - option_separator_specified_ (false), - keep_separator_ (), - no_combined_flags_ (), - no_combined_values_ (), - include_with_brackets_ (), - include_prefix_ (), - include_prefix_specified_ (false), - guard_prefix_ (), - guard_prefix_specified_ (false), - reserved_name_ (), - reserved_name_specified_ (false), - options_file_ (), - options_file_specified_ (false) -{ - ::cli::argv_scanner s (start, argc, argv, erase); - _parse (s, opt, arg); - end = s.end (); -} - -options:: -options (::cli::scanner& s, - ::cli::unknown_mode opt, - ::cli::unknown_mode arg) -: build2_metadata_ (), - build2_metadata_specified_ (false), - help_ (), - version_ (), - include_path_ (), - include_path_specified_ (false), - output_dir_ (), - output_dir_specified_ (false), - std_ (cxx_version::cxx98), - std_specified_ (false), - generate_modifier_ (), - generate_specifier_ (), - generate_parse_ (), - generate_merge_ (), - generate_description_ (), - generate_file_scanner_ (), - generate_vector_scanner_ (), - generate_group_scanner_ (), - suppress_inline_ (), - suppress_cli_ (), - cli_namespace_ ("::cli"), - cli_namespace_specified_ (false), - ostream_type_ ("::std::ostream"), - ostream_type_specified_ (false), - generate_cxx_ (), - generate_man_ (), - generate_html_ (), - generate_txt_ (), - stdout__ (), - suppress_undocumented_ (), - suppress_usage_ (), - long_usage_ (), - short_usage_ (), - page_usage_ (), - page_usage_specified_ (false), - option_length_ (0), - option_length_specified_ (false), - ansi_color_ (), - exclude_base_ (), - include_base_last_ (), - class_doc_ (), - class_doc_specified_ (false), - class__ (), - class__specified_ (false), - docvar_ (), - docvar_specified_ (false), - link_regex_ (), - link_regex_specified_ (false), - link_regex_trace_ (), - html_heading_map_ (), - html_heading_map_specified_ (false), - omit_link_check_ (), - hxx_prologue_ (), - hxx_prologue_specified_ (false), - ixx_prologue_ (), - ixx_prologue_specified_ (false), - cxx_prologue_ (), - cxx_prologue_specified_ (false), - man_prologue_ (), - man_prologue_specified_ (false), - html_prologue_ (), - html_prologue_specified_ (false), - txt_prologue_ (), - txt_prologue_specified_ (false), - hxx_epilogue_ (), - hxx_epilogue_specified_ (false), - ixx_epilogue_ (), - ixx_epilogue_specified_ (false), - cxx_epilogue_ (), - cxx_epilogue_specified_ (false), - man_epilogue_ (), - man_epilogue_specified_ (false), - html_epilogue_ (), - html_epilogue_specified_ (false), - txt_epilogue_ (), - txt_epilogue_specified_ (false), - hxx_prologue_file_ (), - hxx_prologue_file_specified_ (false), - ixx_prologue_file_ (), - ixx_prologue_file_specified_ (false), - cxx_prologue_file_ (), - cxx_prologue_file_specified_ (false), - man_prologue_file_ (), - man_prologue_file_specified_ (false), - html_prologue_file_ (), - html_prologue_file_specified_ (false), - txt_prologue_file_ (), - txt_prologue_file_specified_ (false), - hxx_epilogue_file_ (), - hxx_epilogue_file_specified_ (false), - ixx_epilogue_file_ (), - ixx_epilogue_file_specified_ (false), - cxx_epilogue_file_ (), - cxx_epilogue_file_specified_ (false), - man_epilogue_file_ (), - man_epilogue_file_specified_ (false), - html_epilogue_file_ (), - html_epilogue_file_specified_ (false), - txt_epilogue_file_ (), - txt_epilogue_file_specified_ (false), - output_prefix_ (), - output_prefix_specified_ (false), - output_suffix_ (), - output_suffix_specified_ (false), - hxx_suffix_ (".hxx"), - hxx_suffix_specified_ (false), - ixx_suffix_ (".ixx"), - ixx_suffix_specified_ (false), - cxx_suffix_ (".cxx"), - cxx_suffix_specified_ (false), - man_suffix_ (".1"), - man_suffix_specified_ (false), - html_suffix_ (".html"), - html_suffix_specified_ (false), - txt_suffix_ (".txt"), - txt_suffix_specified_ (false), - option_prefix_ ("-"), - option_prefix_specified_ (false), - option_separator_ ("--"), - option_separator_specified_ (false), - keep_separator_ (), - no_combined_flags_ (), - no_combined_values_ (), - include_with_brackets_ (), - include_prefix_ (), - include_prefix_specified_ (false), - guard_prefix_ (), - guard_prefix_specified_ (false), - reserved_name_ (), - reserved_name_specified_ (false), - options_file_ (), - options_file_specified_ (false) -{ - _parse (s, opt, arg); -} - -::cli::usage_para options:: -print_usage (::std::ostream& os, ::cli::usage_para p) -{ - CLI_POTENTIALLY_UNUSED (os); - - if (p == ::cli::usage_para::text) - os << ::std::endl; - - os << "--help Print usage information and exit." << ::std::endl; - - os << "--version Print version and exit." << ::std::endl; - - os << "--include-path|-I Search for bracket-included (<>) options" << ::std::endl - << " files." << ::std::endl; - - os << "--output-dir|-o Write the generated files to instead of the" << ::std::endl - << " current directory." << ::std::endl; - - os << "--std Specify the C++ standard that should be used" << ::std::endl - << " during compilation." << ::std::endl; - - os << "--generate-modifier Generate option value modifiers in addition to" << ::std::endl - << " accessors." << ::std::endl; - - os << "--generate-specifier Generate functions for determining whether the" << ::std::endl - << " option was specified on the command line." << ::std::endl; - - os << "--generate-parse Generate parse() functions instead of parsing" << ::std::endl - << " constructors." << ::std::endl; - - os << "--generate-merge Generate merge() functions." << ::std::endl; - - os << "--generate-description Generate the option description list that can be" << ::std::endl - << " examined at runtime." << ::std::endl; - - os << "--generate-file-scanner Generate the argv_file_scanner implementation." << ::std::endl; - - os << "--generate-vector-scanner Generate the vector_scanner implementation." << ::std::endl; - - os << "--generate-group-scanner Generate the group_scanner implementation." << ::std::endl; - - os << "--suppress-inline Generate all functions non-inline." << ::std::endl; - - os << "--suppress-cli Do not generate the CLI support types (scanners," << ::std::endl - << " parser, etc)." << ::std::endl; - - os << "--cli-namespace Generate the CLI support types in the " << ::std::endl - << " namespace (cli by default)." << ::std::endl; - - os << "--ostream-type Output stream type instead of the default" << ::std::endl - << " std::ostream that should be used to print usage" << ::std::endl - << " and exception information." << ::std::endl; - - os << "--generate-cxx Generate C++ code." << ::std::endl; - - os << "--generate-man Generate documentation in the man page format." << ::std::endl; - - os << "--generate-html Generate documentation in the HTML format." << ::std::endl; - - os << "--generate-txt Generate documentation in the plain text format," << ::std::endl - << " similar to usage." << ::std::endl; - - os << "--stdout Write output to STDOUT instead of a file." << ::std::endl; - - os << "--suppress-undocumented Suppress the generation of documentation entries" << ::std::endl - << " for undocumented options." << ::std::endl; - - os << "--suppress-usage Suppress the generation of the usage printing" << ::std::endl - << " code." << ::std::endl; - - os << "--long-usage If no short documentation string is provided, use" << ::std::endl - << " the complete long documentation string in usage." << ::std::endl; - - os << "--short-usage If specified together with --long-usage, generate" << ::std::endl - << " both short and long usage versions." << ::std::endl; - - os << "--page-usage Generate the combined usage printing code for the" << ::std::endl - << " entire page." << ::std::endl; - - os << "--option-length Indent option descriptions characters when" << ::std::endl - << " printing usage." << ::std::endl; - - os << "--ansi-color Use ANSI color escape sequences when printing" << ::std::endl - << " usage." << ::std::endl; - - os << "--exclude-base Exclude base class information from usage and" << ::std::endl - << " documentation." << ::std::endl; - - os << "--include-base-last Include base class information after derived for" << ::std::endl - << " usage and documentation." << ::std::endl; - - os << "--class-doc = Specify the documentation that should be" << ::std::endl - << " used for the options class ." << ::std::endl; - - os << "--class Generate the man page, HTML, or text documentation" << ::std::endl - << " only for the options class ." << ::std::endl; - - os << "--docvar|-v = Set documentation variable to the value" << ::std::endl - << " ." << ::std::endl; - - os << "--link-regex Add to the list of regular expressions" << ::std::endl - << " used to transform link targets in the generated" << ::std::endl - << " documentation." << ::std::endl; - - os << "--link-regex-trace Trace the process of applying regular expressions" << ::std::endl - << " specified with the --link-regex option." << ::std::endl; - - os << "--html-heading-map = Map CLI heading (valid values: 'H', '0', '1'," << ::std::endl - << " 'h', and '2') to HTML heading (for example," << ::std::endl - << " 'h1', 'h2', etc)." << ::std::endl; - - os << "--omit-link-check Don't check that local fragment link references" << ::std::endl - << " (\\l{#ref ...}) resolve to ids." << ::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 << "--txt-prologue Insert at the beginning of the generated" << ::std::endl - << " text 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 - << " file." << ::std::endl; - - os << "--html-epilogue Insert at the end of the generated HTML" << ::std::endl - << " file." << ::std::endl; - - os << "--txt-epilogue Insert at the end of the generated text" << ::std::endl - << " file." << ::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 generated HTML file." << ::std::endl; - - os << "--txt-prologue-file Insert the content of at the beginning of" << ::std::endl - << " the generated text 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 - << " generated HTML file." << ::std::endl; - - os << "--txt-epilogue-file Insert the content of at the end of the" << ::std::endl - << " generated text file." << ::std::endl; - - os << "--output-prefix Add at the beginning of the generated" << ::std::endl - << " output file name(s)." << ::std::endl; - - os << "--output-suffix Add at the end of the generated output" << ::std::endl - << " file name(s)." << ::std::endl; - - os << "--hxx-suffix Use instead of the default .hxx to" << ::std::endl - << " construct the name of the generated header file." << ::std::endl; - - os << "--ixx-suffix Use instead of the default .ixx to" << ::std::endl - << " construct the name of the generated inline file." << ::std::endl; - - os << "--cxx-suffix Use instead of the default .cxx to" << ::std::endl - << " construct the name of the generated source file." << ::std::endl; - - os << "--man-suffix Use instead of the default .1 to" << ::std::endl - << " construct the name of the generated man page file." << ::std::endl; - - os << "--html-suffix Use instead of the default .html to" << ::std::endl - << " construct the name of the generated HTML file." << ::std::endl; - - os << "--txt-suffix Use instead of the default .txt to" << ::std::endl - << " construct the name of the generated text file." << ::std::endl; - - os << "--option-prefix Use instead of the default '-' as an" << ::std::endl - << " option prefix." << ::std::endl; - - os << "--option-separator Use instead of the default '--' as an" << ::std::endl - << " optional separator between options and arguments." << ::std::endl; - - os << "--keep-separator Leave the option separator in the scanner." << ::std::endl; - - os << "--no-combined-flags Disable support for combining multiple" << ::std::endl - << " single-character flags into a single argument (the" << ::std::endl - << " -xyz form that is equivalent to -x -y -z)." << ::std::endl; - - os << "--no-combined-values Disable support for combining an option and its" << ::std::endl - << " value into a single argument with the assignment" << ::std::endl - << " sign (the option=value form)." << ::std::endl; - - os << "--include-with-brackets Use angle brackets (<>) instead of quotes (\"\") in" << ::std::endl - << " the generated #include directives." << ::std::endl; - - os << "--include-prefix Add to the generated #include directive" << ::std::endl - << " paths." << ::std::endl; - - os << "--guard-prefix Add to the generated header inclusion" << ::std::endl - << " guards." << ::std::endl; - - os << "--reserved-name = Add with an optional replacement to" << ::std::endl - << " the list of names that should not be used as" << ::std::endl - << " identifiers." << ::std::endl; - - os << "--options-file Read additional options from ." << ::std::endl; - - p = ::cli::usage_para::option; - - return p; -} - -typedef -std::map -_cli_options_map; - -static _cli_options_map _cli_options_map_; - -struct _cli_options_map_init -{ - _cli_options_map_init () - { - _cli_options_map_["--build2-metadata"] = - &::cli::thunk< options, std::uint64_t, &options::build2_metadata_, - &options::build2_metadata_specified_ >; - _cli_options_map_["--help"] = - &::cli::thunk< options, bool, &options::help_ >; - _cli_options_map_["--version"] = - &::cli::thunk< options, bool, &options::version_ >; - _cli_options_map_["--include-path"] = - &::cli::thunk< options, std::vector, &options::include_path_, - &options::include_path_specified_ >; - _cli_options_map_["-I"] = - &::cli::thunk< options, std::vector, &options::include_path_, - &options::include_path_specified_ >; - _cli_options_map_["--output-dir"] = - &::cli::thunk< options, std::string, &options::output_dir_, - &options::output_dir_specified_ >; - _cli_options_map_["-o"] = - &::cli::thunk< options, std::string, &options::output_dir_, - &options::output_dir_specified_ >; - _cli_options_map_["--std"] = - &::cli::thunk< options, cxx_version, &options::std_, - &options::std_specified_ >; - _cli_options_map_["--generate-modifier"] = - &::cli::thunk< options, bool, &options::generate_modifier_ >; - _cli_options_map_["--generate-specifier"] = - &::cli::thunk< options, bool, &options::generate_specifier_ >; - _cli_options_map_["--generate-parse"] = - &::cli::thunk< options, bool, &options::generate_parse_ >; - _cli_options_map_["--generate-merge"] = - &::cli::thunk< options, bool, &options::generate_merge_ >; - _cli_options_map_["--generate-description"] = - &::cli::thunk< options, bool, &options::generate_description_ >; - _cli_options_map_["--generate-file-scanner"] = - &::cli::thunk< options, bool, &options::generate_file_scanner_ >; - _cli_options_map_["--generate-vector-scanner"] = - &::cli::thunk< options, bool, &options::generate_vector_scanner_ >; - _cli_options_map_["--generate-group-scanner"] = - &::cli::thunk< options, bool, &options::generate_group_scanner_ >; - _cli_options_map_["--suppress-inline"] = - &::cli::thunk< options, bool, &options::suppress_inline_ >; - _cli_options_map_["--suppress-cli"] = - &::cli::thunk< options, bool, &options::suppress_cli_ >; - _cli_options_map_["--cli-namespace"] = - &::cli::thunk< options, std::string, &options::cli_namespace_, - &options::cli_namespace_specified_ >; - _cli_options_map_["--ostream-type"] = - &::cli::thunk< options, std::string, &options::ostream_type_, - &options::ostream_type_specified_ >; - _cli_options_map_["--generate-cxx"] = - &::cli::thunk< options, bool, &options::generate_cxx_ >; - _cli_options_map_["--generate-man"] = - &::cli::thunk< options, bool, &options::generate_man_ >; - _cli_options_map_["--generate-html"] = - &::cli::thunk< options, bool, &options::generate_html_ >; - _cli_options_map_["--generate-txt"] = - &::cli::thunk< options, bool, &options::generate_txt_ >; - _cli_options_map_["--stdout"] = - &::cli::thunk< options, bool, &options::stdout__ >; - _cli_options_map_["--suppress-undocumented"] = - &::cli::thunk< options, bool, &options::suppress_undocumented_ >; - _cli_options_map_["--suppress-usage"] = - &::cli::thunk< options, bool, &options::suppress_usage_ >; - _cli_options_map_["--long-usage"] = - &::cli::thunk< options, bool, &options::long_usage_ >; - _cli_options_map_["--short-usage"] = - &::cli::thunk< options, bool, &options::short_usage_ >; - _cli_options_map_["--page-usage"] = - &::cli::thunk< options, std::string, &options::page_usage_, - &options::page_usage_specified_ >; - _cli_options_map_["--option-length"] = - &::cli::thunk< options, std::size_t, &options::option_length_, - &options::option_length_specified_ >; - _cli_options_map_["--ansi-color"] = - &::cli::thunk< options, bool, &options::ansi_color_ >; - _cli_options_map_["--exclude-base"] = - &::cli::thunk< options, bool, &options::exclude_base_ >; - _cli_options_map_["--include-base-last"] = - &::cli::thunk< options, bool, &options::include_base_last_ >; - _cli_options_map_["--class-doc"] = - &::cli::thunk< options, std::map, &options::class_doc_, - &options::class_doc_specified_ >; - _cli_options_map_["--class"] = - &::cli::thunk< options, std::vector, &options::class__, - &options::class__specified_ >; - _cli_options_map_["--docvar"] = - &::cli::thunk< options, std::map, &options::docvar_, - &options::docvar_specified_ >; - _cli_options_map_["-v"] = - &::cli::thunk< options, std::map, &options::docvar_, - &options::docvar_specified_ >; - _cli_options_map_["--link-regex"] = - &::cli::thunk< options, std::vector, &options::link_regex_, - &options::link_regex_specified_ >; - _cli_options_map_["--link-regex-trace"] = - &::cli::thunk< options, bool, &options::link_regex_trace_ >; - _cli_options_map_["--html-heading-map"] = - &::cli::thunk< options, std::map, &options::html_heading_map_, - &options::html_heading_map_specified_ >; - _cli_options_map_["--omit-link-check"] = - &::cli::thunk< options, bool, &options::omit_link_check_ >; - _cli_options_map_["--hxx-prologue"] = - &::cli::thunk< options, std::vector, &options::hxx_prologue_, - &options::hxx_prologue_specified_ >; - _cli_options_map_["--ixx-prologue"] = - &::cli::thunk< options, std::vector, &options::ixx_prologue_, - &options::ixx_prologue_specified_ >; - _cli_options_map_["--cxx-prologue"] = - &::cli::thunk< options, std::vector, &options::cxx_prologue_, - &options::cxx_prologue_specified_ >; - _cli_options_map_["--man-prologue"] = - &::cli::thunk< options, std::vector, &options::man_prologue_, - &options::man_prologue_specified_ >; - _cli_options_map_["--html-prologue"] = - &::cli::thunk< options, std::vector, &options::html_prologue_, - &options::html_prologue_specified_ >; - _cli_options_map_["--txt-prologue"] = - &::cli::thunk< options, std::vector, &options::txt_prologue_, - &options::txt_prologue_specified_ >; - _cli_options_map_["--hxx-epilogue"] = - &::cli::thunk< options, std::vector, &options::hxx_epilogue_, - &options::hxx_epilogue_specified_ >; - _cli_options_map_["--ixx-epilogue"] = - &::cli::thunk< options, std::vector, &options::ixx_epilogue_, - &options::ixx_epilogue_specified_ >; - _cli_options_map_["--cxx-epilogue"] = - &::cli::thunk< options, std::vector, &options::cxx_epilogue_, - &options::cxx_epilogue_specified_ >; - _cli_options_map_["--man-epilogue"] = - &::cli::thunk< options, std::vector, &options::man_epilogue_, - &options::man_epilogue_specified_ >; - _cli_options_map_["--html-epilogue"] = - &::cli::thunk< options, std::vector, &options::html_epilogue_, - &options::html_epilogue_specified_ >; - _cli_options_map_["--txt-epilogue"] = - &::cli::thunk< options, std::vector, &options::txt_epilogue_, - &options::txt_epilogue_specified_ >; - _cli_options_map_["--hxx-prologue-file"] = - &::cli::thunk< options, std::string, &options::hxx_prologue_file_, - &options::hxx_prologue_file_specified_ >; - _cli_options_map_["--ixx-prologue-file"] = - &::cli::thunk< options, std::string, &options::ixx_prologue_file_, - &options::ixx_prologue_file_specified_ >; - _cli_options_map_["--cxx-prologue-file"] = - &::cli::thunk< options, std::string, &options::cxx_prologue_file_, - &options::cxx_prologue_file_specified_ >; - _cli_options_map_["--man-prologue-file"] = - &::cli::thunk< options, std::string, &options::man_prologue_file_, - &options::man_prologue_file_specified_ >; - _cli_options_map_["--html-prologue-file"] = - &::cli::thunk< options, std::string, &options::html_prologue_file_, - &options::html_prologue_file_specified_ >; - _cli_options_map_["--txt-prologue-file"] = - &::cli::thunk< options, std::string, &options::txt_prologue_file_, - &options::txt_prologue_file_specified_ >; - _cli_options_map_["--hxx-epilogue-file"] = - &::cli::thunk< options, std::string, &options::hxx_epilogue_file_, - &options::hxx_epilogue_file_specified_ >; - _cli_options_map_["--ixx-epilogue-file"] = - &::cli::thunk< options, std::string, &options::ixx_epilogue_file_, - &options::ixx_epilogue_file_specified_ >; - _cli_options_map_["--cxx-epilogue-file"] = - &::cli::thunk< options, std::string, &options::cxx_epilogue_file_, - &options::cxx_epilogue_file_specified_ >; - _cli_options_map_["--man-epilogue-file"] = - &::cli::thunk< options, std::string, &options::man_epilogue_file_, - &options::man_epilogue_file_specified_ >; - _cli_options_map_["--html-epilogue-file"] = - &::cli::thunk< options, std::string, &options::html_epilogue_file_, - &options::html_epilogue_file_specified_ >; - _cli_options_map_["--txt-epilogue-file"] = - &::cli::thunk< options, std::string, &options::txt_epilogue_file_, - &options::txt_epilogue_file_specified_ >; - _cli_options_map_["--output-prefix"] = - &::cli::thunk< options, std::string, &options::output_prefix_, - &options::output_prefix_specified_ >; - _cli_options_map_["--output-suffix"] = - &::cli::thunk< options, std::string, &options::output_suffix_, - &options::output_suffix_specified_ >; - _cli_options_map_["--hxx-suffix"] = - &::cli::thunk< options, std::string, &options::hxx_suffix_, - &options::hxx_suffix_specified_ >; - _cli_options_map_["--ixx-suffix"] = - &::cli::thunk< options, std::string, &options::ixx_suffix_, - &options::ixx_suffix_specified_ >; - _cli_options_map_["--cxx-suffix"] = - &::cli::thunk< options, std::string, &options::cxx_suffix_, - &options::cxx_suffix_specified_ >; - _cli_options_map_["--man-suffix"] = - &::cli::thunk< options, std::string, &options::man_suffix_, - &options::man_suffix_specified_ >; - _cli_options_map_["--html-suffix"] = - &::cli::thunk< options, std::string, &options::html_suffix_, - &options::html_suffix_specified_ >; - _cli_options_map_["--txt-suffix"] = - &::cli::thunk< options, std::string, &options::txt_suffix_, - &options::txt_suffix_specified_ >; - _cli_options_map_["--option-prefix"] = - &::cli::thunk< options, std::string, &options::option_prefix_, - &options::option_prefix_specified_ >; - _cli_options_map_["--option-separator"] = - &::cli::thunk< options, std::string, &options::option_separator_, - &options::option_separator_specified_ >; - _cli_options_map_["--keep-separator"] = - &::cli::thunk< options, bool, &options::keep_separator_ >; - _cli_options_map_["--no-combined-flags"] = - &::cli::thunk< options, bool, &options::no_combined_flags_ >; - _cli_options_map_["--no-combined-values"] = - &::cli::thunk< options, bool, &options::no_combined_values_ >; - _cli_options_map_["--include-with-brackets"] = - &::cli::thunk< options, bool, &options::include_with_brackets_ >; - _cli_options_map_["--include-prefix"] = - &::cli::thunk< options, std::string, &options::include_prefix_, - &options::include_prefix_specified_ >; - _cli_options_map_["--guard-prefix"] = - &::cli::thunk< options, std::string, &options::guard_prefix_, - &options::guard_prefix_specified_ >; - _cli_options_map_["--reserved-name"] = - &::cli::thunk< options, std::map, &options::reserved_name_, - &options::reserved_name_specified_ >; - _cli_options_map_["--options-file"] = - &::cli::thunk< options, std::string, &options::options_file_, - &options::options_file_specified_ >; - } -}; - -static _cli_options_map_init _cli_options_map_init_; - -bool options:: -_parse (const char* o, ::cli::scanner& s) -{ - _cli_options_map::const_iterator i (_cli_options_map_.find (o)); - - if (i != _cli_options_map_.end ()) - { - (*(i->second)) (*this, s); - return true; - } - - return false; -} - -bool options:: -_parse (::cli::scanner& s, - ::cli::unknown_mode opt_mode, - ::cli::unknown_mode arg_mode) -{ - // Can't skip combined flags (--no-combined-flags). - // - assert (opt_mode != ::cli::unknown_mode::skip); - - bool r = false; - bool opt = true; - - while (s.more ()) - { - const char* o = s.peek (); - - if (std::strcmp (o, "--") == 0) - { - opt = false; - s.skip (); - r = true; - continue; - } - - if (opt) - { - if (_parse (o, s)) - { - r = true; - continue; - } - - if (std::strncmp (o, "-", 1) == 0 && o[1] != '\0') - { - // Handle combined option values. - // - std::string co; - if (const char* v = std::strchr (o, '=')) - { - co.assign (o, 0, v - o); - ++v; - - int ac (2); - char* av[] = - { - const_cast (co.c_str ()), - const_cast (v) - }; - - ::cli::argv_scanner ns (0, ac, av); - - if (_parse (co.c_str (), ns)) - { - // Parsed the option but not its value? - // - if (ns.end () != 2) - throw ::cli::invalid_value (co, v); - - s.next (); - r = true; - continue; - } - else - { - // Set the unknown option and fall through. - // - o = co.c_str (); - } - } - - // Handle combined flags. - // - char cf[3]; - { - const char* p = o + 1; - for (; *p != '\0'; ++p) - { - if (!((*p >= 'a' && *p <= 'z') || - (*p >= 'A' && *p <= 'Z') || - (*p >= '0' && *p <= '9'))) - break; - } - - if (*p == '\0') - { - for (p = o + 1; *p != '\0'; ++p) - { - std::strcpy (cf, "-"); - cf[1] = *p; - cf[2] = '\0'; - - int ac (1); - char* av[] = - { - cf - }; - - ::cli::argv_scanner ns (0, ac, av); - - if (!_parse (cf, ns)) - break; - } - - if (*p == '\0') - { - // All handled. - // - s.next (); - r = true; - continue; - } - else - { - // Set the unknown option and fall through. - // - o = cf; - } - } - } - - switch (opt_mode) - { - case ::cli::unknown_mode::skip: - { - s.skip (); - r = true; - continue; - } - case ::cli::unknown_mode::stop: - { - break; - } - case ::cli::unknown_mode::fail: - { - throw ::cli::unknown_option (o); - } - } - - break; - } - } - - switch (arg_mode) - { - case ::cli::unknown_mode::skip: - { - s.skip (); - r = true; - continue; - } - case ::cli::unknown_mode::stop: - { - break; - } - case ::cli::unknown_mode::fail: - { - throw ::cli::unknown_argument (o); - } - } - - break; - } - - return r; -} - -// Begin epilogue. -// -// -// End epilogue. - diff --git a/cli/cli/options.hxx b/cli/cli/options.hxx deleted file mode 100644 index b54d81f..0000000 --- a/cli/cli/options.hxx +++ /dev/null @@ -1,1641 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -#ifndef CLI_OPTIONS_HXX -#define CLI_OPTIONS_HXX - -// Begin prologue. -// -// -// End prologue. - -#include -#include -#include -#include -#include -#include - -#ifndef CLI_POTENTIALLY_UNUSED -# if defined(_MSC_VER) || defined(__xlC__) -# define CLI_POTENTIALLY_UNUSED(x) (void*)&x -# else -# define CLI_POTENTIALLY_UNUSED(x) (void)x -# endif -#endif - -namespace cli -{ - class usage_para - { - public: - enum value - { - none, - text, - option - }; - - usage_para (value); - - operator value () const - { - return v_; - } - - private: - value v_; - }; - - class unknown_mode - { - public: - enum value - { - skip, - stop, - fail - }; - - unknown_mode (value); - - operator value () const - { - return v_; - } - - private: - value v_; - }; - - // Exceptions. - // - - class exception: public std::exception - { - public: - virtual void - print (::std::ostream&) const = 0; - }; - - ::std::ostream& - operator<< (::std::ostream&, const exception&); - - class unknown_option: public exception - { - public: - virtual - ~unknown_option () throw (); - - unknown_option (const std::string& option); - - const std::string& - option () const; - - virtual void - print (::std::ostream&) const; - - virtual const char* - what () const throw (); - - private: - std::string option_; - }; - - class unknown_argument: public exception - { - public: - virtual - ~unknown_argument () throw (); - - unknown_argument (const std::string& argument); - - const std::string& - argument () const; - - virtual void - print (::std::ostream&) const; - - virtual const char* - what () const throw (); - - private: - std::string argument_; - }; - - class missing_value: public exception - { - public: - virtual - ~missing_value () throw (); - - missing_value (const std::string& option); - - const std::string& - option () const; - - virtual void - print (::std::ostream&) const; - - virtual const char* - what () const throw (); - - private: - std::string option_; - }; - - class invalid_value: public exception - { - public: - virtual - ~invalid_value () throw (); - - invalid_value (const std::string& option, - const std::string& value, - const std::string& message = std::string ()); - - const std::string& - option () const; - - const std::string& - value () const; - - const std::string& - message () const; - - virtual void - print (::std::ostream&) const; - - virtual const char* - what () const throw (); - - private: - std::string option_; - std::string value_; - std::string message_; - }; - - class eos_reached: public exception - { - public: - virtual void - print (::std::ostream&) const; - - virtual const char* - what () const throw (); - }; - - class file_io_failure: public exception - { - public: - virtual - ~file_io_failure () throw (); - - file_io_failure (const std::string& file); - - const std::string& - file () const; - - virtual void - print (::std::ostream&) const; - - virtual const char* - what () const throw (); - - private: - std::string file_; - }; - - class unmatched_quote: public exception - { - public: - virtual - ~unmatched_quote () throw (); - - unmatched_quote (const std::string& argument); - - const std::string& - argument () const; - - virtual void - print (::std::ostream&) const; - - virtual const char* - what () const throw (); - - private: - std::string argument_; - }; - - // Command line argument scanner interface. - // - // The values returned by next() are guaranteed to be valid - // for the two previous arguments up until a call to a third - // peek() or next(). - // - class scanner - { - public: - virtual - ~scanner (); - - virtual bool - more () = 0; - - virtual const char* - peek () = 0; - - virtual const char* - next () = 0; - - virtual void - skip () = 0; - }; - - class argv_scanner: public scanner - { - public: - argv_scanner (int& argc, char** argv, bool erase = false); - argv_scanner (int start, int& argc, char** argv, bool erase = false); - - int - end () const; - - virtual bool - more (); - - virtual const char* - peek (); - - virtual const char* - next (); - - virtual void - skip (); - - private: - int i_; - int& argc_; - char** argv_; - bool erase_; - }; - - class argv_file_scanner: public argv_scanner - { - public: - argv_file_scanner (int& argc, - char** argv, - const std::string& option, - bool erase = false); - - argv_file_scanner (int start, - int& argc, - char** argv, - const std::string& option, - bool erase = false); - - argv_file_scanner (const std::string& file, - const std::string& option); - - struct option_info - { - // If search_func is not NULL, it is called, with the arg - // value as the second argument, to locate the options file. - // If it returns an empty string, then the file is ignored. - // - const char* option; - std::string (*search_func) (const char*, void* arg); - void* arg; - }; - - argv_file_scanner (int& argc, - char** argv, - const option_info* options, - std::size_t options_count, - bool erase = false); - - argv_file_scanner (int start, - int& argc, - char** argv, - const option_info* options, - std::size_t options_count, - bool erase = false); - - argv_file_scanner (const std::string& file, - const option_info* options = 0, - std::size_t options_count = 0); - - virtual bool - more (); - - virtual const char* - peek (); - - virtual const char* - next (); - - virtual void - skip (); - - // Return the file path if the peeked at argument came from a file and - // the empty string otherwise. The reference is guaranteed to be valid - // till the end of the scanner lifetime. - // - const std::string& - peek_file (); - - // Return the 1-based line number if the peeked at argument came from - // a file and zero otherwise. - // - std::size_t - peek_line (); - - private: - const option_info* - find (const char*) const; - - void - load (const std::string& file); - - typedef argv_scanner base; - - const std::string option_; - option_info option_info_; - const option_info* options_; - std::size_t options_count_; - - struct arg - { - std::string value; - const std::string* file; - std::size_t line; - }; - - std::deque args_; - std::list files_; - - // Circular buffer of two arguments. - // - std::string hold_[2]; - std::size_t i_; - - bool skip_; - - static int zero_argc_; - static std::string empty_string_; - }; - - template - struct parser; -} - -#include - -#include - -#include - -#include - -#include - -#include - -class options -{ - public: - options (); - - options (int& argc, - char** argv, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (int start, - int& argc, - char** argv, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (int& argc, - char** argv, - int& end, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (int start, - int& argc, - char** argv, - int& end, - bool erase = false, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - options (::cli::scanner&, - ::cli::unknown_mode option = ::cli::unknown_mode::fail, - ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - - // Option accessors and modifiers. - // - const std::uint64_t& - build2_metadata () const; - - std::uint64_t& - build2_metadata (); - - void - build2_metadata (const std::uint64_t&); - - bool - build2_metadata_specified () const; - - void - build2_metadata_specified (bool); - - const bool& - help () const; - - bool& - help (); - - void - help (const bool&); - - const bool& - version () const; - - bool& - version (); - - void - version (const bool&); - - const std::vector& - include_path () const; - - std::vector& - include_path (); - - void - include_path (const std::vector&); - - bool - include_path_specified () const; - - void - include_path_specified (bool); - - const std::string& - output_dir () const; - - std::string& - output_dir (); - - void - output_dir (const std::string&); - - bool - output_dir_specified () const; - - void - output_dir_specified (bool); - - const cxx_version& - std () const; - - cxx_version& - std (); - - void - std (const cxx_version&); - - bool - std_specified () const; - - void - std_specified (bool); - - const bool& - generate_modifier () const; - - bool& - generate_modifier (); - - void - generate_modifier (const bool&); - - const bool& - generate_specifier () const; - - bool& - generate_specifier (); - - void - generate_specifier (const bool&); - - const bool& - generate_parse () const; - - bool& - generate_parse (); - - void - generate_parse (const bool&); - - const bool& - generate_merge () const; - - bool& - generate_merge (); - - void - generate_merge (const bool&); - - const bool& - generate_description () const; - - bool& - generate_description (); - - void - generate_description (const bool&); - - const bool& - generate_file_scanner () const; - - bool& - generate_file_scanner (); - - void - generate_file_scanner (const bool&); - - const bool& - generate_vector_scanner () const; - - bool& - generate_vector_scanner (); - - void - generate_vector_scanner (const bool&); - - const bool& - generate_group_scanner () const; - - bool& - generate_group_scanner (); - - void - generate_group_scanner (const bool&); - - const bool& - suppress_inline () const; - - bool& - suppress_inline (); - - void - suppress_inline (const bool&); - - const bool& - suppress_cli () const; - - bool& - suppress_cli (); - - void - suppress_cli (const bool&); - - const std::string& - cli_namespace () const; - - std::string& - cli_namespace (); - - void - cli_namespace (const std::string&); - - bool - cli_namespace_specified () const; - - void - cli_namespace_specified (bool); - - const std::string& - ostream_type () const; - - std::string& - ostream_type (); - - void - ostream_type (const std::string&); - - bool - ostream_type_specified () const; - - void - ostream_type_specified (bool); - - const bool& - generate_cxx () const; - - bool& - generate_cxx (); - - void - generate_cxx (const bool&); - - const bool& - generate_man () const; - - bool& - generate_man (); - - void - generate_man (const bool&); - - const bool& - generate_html () const; - - bool& - generate_html (); - - void - generate_html (const bool&); - - const bool& - generate_txt () const; - - bool& - generate_txt (); - - void - generate_txt (const bool&); - - const bool& - stdout_ () const; - - bool& - stdout_ (); - - void - stdout_ (const bool&); - - const bool& - suppress_undocumented () const; - - bool& - suppress_undocumented (); - - void - suppress_undocumented (const bool&); - - const bool& - suppress_usage () const; - - bool& - suppress_usage (); - - void - suppress_usage (const bool&); - - const bool& - long_usage () const; - - bool& - long_usage (); - - void - long_usage (const bool&); - - const bool& - short_usage () const; - - bool& - short_usage (); - - void - short_usage (const bool&); - - const std::string& - page_usage () const; - - std::string& - page_usage (); - - void - page_usage (const std::string&); - - bool - page_usage_specified () const; - - void - page_usage_specified (bool); - - const std::size_t& - option_length () const; - - std::size_t& - option_length (); - - void - option_length (const std::size_t&); - - bool - option_length_specified () const; - - void - option_length_specified (bool); - - const bool& - ansi_color () const; - - bool& - ansi_color (); - - void - ansi_color (const bool&); - - const bool& - exclude_base () const; - - bool& - exclude_base (); - - void - exclude_base (const bool&); - - const bool& - include_base_last () const; - - bool& - include_base_last (); - - void - include_base_last (const bool&); - - const std::map& - class_doc () const; - - std::map& - class_doc (); - - void - class_doc (const std::map&); - - bool - class_doc_specified () const; - - void - class_doc_specified (bool); - - const std::vector& - class_ () const; - - std::vector& - class_ (); - - void - class_ (const std::vector&); - - bool - class__specified () const; - - void - class__specified (bool); - - const std::map& - docvar () const; - - std::map& - docvar (); - - void - docvar (const std::map&); - - bool - docvar_specified () const; - - void - docvar_specified (bool); - - const std::vector& - link_regex () const; - - std::vector& - link_regex (); - - void - link_regex (const std::vector&); - - bool - link_regex_specified () const; - - void - link_regex_specified (bool); - - const bool& - link_regex_trace () const; - - bool& - link_regex_trace (); - - void - link_regex_trace (const bool&); - - const std::map& - html_heading_map () const; - - std::map& - html_heading_map (); - - void - html_heading_map (const std::map&); - - bool - html_heading_map_specified () const; - - void - html_heading_map_specified (bool); - - const bool& - omit_link_check () const; - - bool& - omit_link_check (); - - void - omit_link_check (const bool&); - - const std::vector& - hxx_prologue () const; - - std::vector& - hxx_prologue (); - - void - hxx_prologue (const std::vector&); - - bool - hxx_prologue_specified () const; - - void - hxx_prologue_specified (bool); - - const std::vector& - ixx_prologue () const; - - std::vector& - ixx_prologue (); - - void - ixx_prologue (const std::vector&); - - bool - ixx_prologue_specified () const; - - void - ixx_prologue_specified (bool); - - const std::vector& - cxx_prologue () const; - - std::vector& - cxx_prologue (); - - void - cxx_prologue (const std::vector&); - - bool - cxx_prologue_specified () const; - - void - cxx_prologue_specified (bool); - - const std::vector& - man_prologue () const; - - std::vector& - man_prologue (); - - void - man_prologue (const std::vector&); - - bool - man_prologue_specified () const; - - void - man_prologue_specified (bool); - - const std::vector& - html_prologue () const; - - std::vector& - html_prologue (); - - void - html_prologue (const std::vector&); - - bool - html_prologue_specified () const; - - void - html_prologue_specified (bool); - - const std::vector& - txt_prologue () const; - - std::vector& - txt_prologue (); - - void - txt_prologue (const std::vector&); - - bool - txt_prologue_specified () const; - - void - txt_prologue_specified (bool); - - const std::vector& - hxx_epilogue () const; - - std::vector& - hxx_epilogue (); - - void - hxx_epilogue (const std::vector&); - - bool - hxx_epilogue_specified () const; - - void - hxx_epilogue_specified (bool); - - const std::vector& - ixx_epilogue () const; - - std::vector& - ixx_epilogue (); - - void - ixx_epilogue (const std::vector&); - - bool - ixx_epilogue_specified () const; - - void - ixx_epilogue_specified (bool); - - const std::vector& - cxx_epilogue () const; - - std::vector& - cxx_epilogue (); - - void - cxx_epilogue (const std::vector&); - - bool - cxx_epilogue_specified () const; - - void - cxx_epilogue_specified (bool); - - const std::vector& - man_epilogue () const; - - std::vector& - man_epilogue (); - - void - man_epilogue (const std::vector&); - - bool - man_epilogue_specified () const; - - void - man_epilogue_specified (bool); - - const std::vector& - html_epilogue () const; - - std::vector& - html_epilogue (); - - void - html_epilogue (const std::vector&); - - bool - html_epilogue_specified () const; - - void - html_epilogue_specified (bool); - - const std::vector& - txt_epilogue () const; - - std::vector& - txt_epilogue (); - - void - txt_epilogue (const std::vector&); - - bool - txt_epilogue_specified () const; - - void - txt_epilogue_specified (bool); - - const std::string& - hxx_prologue_file () const; - - std::string& - hxx_prologue_file (); - - void - hxx_prologue_file (const std::string&); - - bool - hxx_prologue_file_specified () const; - - void - hxx_prologue_file_specified (bool); - - const std::string& - ixx_prologue_file () const; - - std::string& - ixx_prologue_file (); - - void - ixx_prologue_file (const std::string&); - - bool - ixx_prologue_file_specified () const; - - void - ixx_prologue_file_specified (bool); - - const std::string& - cxx_prologue_file () const; - - std::string& - cxx_prologue_file (); - - void - cxx_prologue_file (const std::string&); - - bool - cxx_prologue_file_specified () const; - - void - cxx_prologue_file_specified (bool); - - const std::string& - man_prologue_file () const; - - std::string& - man_prologue_file (); - - void - man_prologue_file (const std::string&); - - bool - man_prologue_file_specified () const; - - void - man_prologue_file_specified (bool); - - const std::string& - html_prologue_file () const; - - std::string& - html_prologue_file (); - - void - html_prologue_file (const std::string&); - - bool - html_prologue_file_specified () const; - - void - html_prologue_file_specified (bool); - - const std::string& - txt_prologue_file () const; - - std::string& - txt_prologue_file (); - - void - txt_prologue_file (const std::string&); - - bool - txt_prologue_file_specified () const; - - void - txt_prologue_file_specified (bool); - - const std::string& - hxx_epilogue_file () const; - - std::string& - hxx_epilogue_file (); - - void - hxx_epilogue_file (const std::string&); - - bool - hxx_epilogue_file_specified () const; - - void - hxx_epilogue_file_specified (bool); - - const std::string& - ixx_epilogue_file () const; - - std::string& - ixx_epilogue_file (); - - void - ixx_epilogue_file (const std::string&); - - bool - ixx_epilogue_file_specified () const; - - void - ixx_epilogue_file_specified (bool); - - const std::string& - cxx_epilogue_file () const; - - std::string& - cxx_epilogue_file (); - - void - cxx_epilogue_file (const std::string&); - - bool - cxx_epilogue_file_specified () const; - - void - cxx_epilogue_file_specified (bool); - - const std::string& - man_epilogue_file () const; - - std::string& - man_epilogue_file (); - - void - man_epilogue_file (const std::string&); - - bool - man_epilogue_file_specified () const; - - void - man_epilogue_file_specified (bool); - - const std::string& - html_epilogue_file () const; - - std::string& - html_epilogue_file (); - - void - html_epilogue_file (const std::string&); - - bool - html_epilogue_file_specified () const; - - void - html_epilogue_file_specified (bool); - - const std::string& - txt_epilogue_file () const; - - std::string& - txt_epilogue_file (); - - void - txt_epilogue_file (const std::string&); - - bool - txt_epilogue_file_specified () const; - - void - txt_epilogue_file_specified (bool); - - const std::string& - output_prefix () const; - - std::string& - output_prefix (); - - void - output_prefix (const std::string&); - - bool - output_prefix_specified () const; - - void - output_prefix_specified (bool); - - const std::string& - output_suffix () const; - - std::string& - output_suffix (); - - void - output_suffix (const std::string&); - - bool - output_suffix_specified () const; - - void - output_suffix_specified (bool); - - const std::string& - hxx_suffix () const; - - std::string& - hxx_suffix (); - - void - hxx_suffix (const std::string&); - - bool - hxx_suffix_specified () const; - - void - hxx_suffix_specified (bool); - - const std::string& - ixx_suffix () const; - - std::string& - ixx_suffix (); - - void - ixx_suffix (const std::string&); - - bool - ixx_suffix_specified () const; - - void - ixx_suffix_specified (bool); - - const std::string& - cxx_suffix () const; - - std::string& - cxx_suffix (); - - void - cxx_suffix (const std::string&); - - bool - cxx_suffix_specified () const; - - void - cxx_suffix_specified (bool); - - const std::string& - man_suffix () const; - - std::string& - man_suffix (); - - void - man_suffix (const std::string&); - - bool - man_suffix_specified () const; - - void - man_suffix_specified (bool); - - const std::string& - html_suffix () const; - - std::string& - html_suffix (); - - void - html_suffix (const std::string&); - - bool - html_suffix_specified () const; - - void - html_suffix_specified (bool); - - const std::string& - txt_suffix () const; - - std::string& - txt_suffix (); - - void - txt_suffix (const std::string&); - - bool - txt_suffix_specified () const; - - void - txt_suffix_specified (bool); - - const std::string& - option_prefix () const; - - std::string& - option_prefix (); - - void - option_prefix (const std::string&); - - bool - option_prefix_specified () const; - - void - option_prefix_specified (bool); - - const std::string& - option_separator () const; - - std::string& - option_separator (); - - void - option_separator (const std::string&); - - bool - option_separator_specified () const; - - void - option_separator_specified (bool); - - const bool& - keep_separator () const; - - bool& - keep_separator (); - - void - keep_separator (const bool&); - - const bool& - no_combined_flags () const; - - bool& - no_combined_flags (); - - void - no_combined_flags (const bool&); - - const bool& - no_combined_values () const; - - bool& - no_combined_values (); - - void - no_combined_values (const bool&); - - const bool& - include_with_brackets () const; - - bool& - include_with_brackets (); - - void - include_with_brackets (const bool&); - - const std::string& - include_prefix () const; - - std::string& - include_prefix (); - - void - include_prefix (const std::string&); - - bool - include_prefix_specified () const; - - void - include_prefix_specified (bool); - - const std::string& - guard_prefix () const; - - std::string& - guard_prefix (); - - void - guard_prefix (const std::string&); - - bool - guard_prefix_specified () const; - - void - guard_prefix_specified (bool); - - const std::map& - reserved_name () const; - - std::map& - reserved_name (); - - void - reserved_name (const std::map&); - - bool - reserved_name_specified () const; - - void - reserved_name_specified (bool); - - const std::string& - options_file () const; - - std::string& - options_file (); - - void - options_file (const std::string&); - - bool - options_file_specified () const; - - void - options_file_specified (bool); - - // Print usage information. - // - static ::cli::usage_para - print_usage (::std::ostream&, - ::cli::usage_para = ::cli::usage_para::none); - - // Implementation details. - // - protected: - bool - _parse (const char*, ::cli::scanner&); - - private: - bool - _parse (::cli::scanner&, - ::cli::unknown_mode option, - ::cli::unknown_mode argument); - - public: - std::uint64_t build2_metadata_; - bool build2_metadata_specified_; - bool help_; - bool version_; - std::vector include_path_; - bool include_path_specified_; - std::string output_dir_; - bool output_dir_specified_; - cxx_version std_; - bool std_specified_; - bool generate_modifier_; - bool generate_specifier_; - bool generate_parse_; - bool generate_merge_; - bool generate_description_; - bool generate_file_scanner_; - bool generate_vector_scanner_; - bool generate_group_scanner_; - bool suppress_inline_; - bool suppress_cli_; - std::string cli_namespace_; - bool cli_namespace_specified_; - std::string ostream_type_; - bool ostream_type_specified_; - bool generate_cxx_; - bool generate_man_; - bool generate_html_; - bool generate_txt_; - bool stdout__; - bool suppress_undocumented_; - bool suppress_usage_; - bool long_usage_; - bool short_usage_; - std::string page_usage_; - bool page_usage_specified_; - std::size_t option_length_; - bool option_length_specified_; - bool ansi_color_; - bool exclude_base_; - bool include_base_last_; - std::map class_doc_; - bool class_doc_specified_; - std::vector class__; - bool class__specified_; - std::map docvar_; - bool docvar_specified_; - std::vector link_regex_; - bool link_regex_specified_; - bool link_regex_trace_; - std::map html_heading_map_; - bool html_heading_map_specified_; - bool omit_link_check_; - std::vector hxx_prologue_; - bool hxx_prologue_specified_; - std::vector ixx_prologue_; - bool ixx_prologue_specified_; - std::vector cxx_prologue_; - bool cxx_prologue_specified_; - std::vector man_prologue_; - bool man_prologue_specified_; - std::vector html_prologue_; - bool html_prologue_specified_; - std::vector txt_prologue_; - bool txt_prologue_specified_; - std::vector hxx_epilogue_; - bool hxx_epilogue_specified_; - std::vector ixx_epilogue_; - bool ixx_epilogue_specified_; - std::vector cxx_epilogue_; - bool cxx_epilogue_specified_; - std::vector man_epilogue_; - bool man_epilogue_specified_; - std::vector html_epilogue_; - bool html_epilogue_specified_; - std::vector txt_epilogue_; - bool txt_epilogue_specified_; - std::string hxx_prologue_file_; - bool hxx_prologue_file_specified_; - std::string ixx_prologue_file_; - bool ixx_prologue_file_specified_; - std::string cxx_prologue_file_; - bool cxx_prologue_file_specified_; - std::string man_prologue_file_; - bool man_prologue_file_specified_; - std::string html_prologue_file_; - bool html_prologue_file_specified_; - std::string txt_prologue_file_; - bool txt_prologue_file_specified_; - std::string hxx_epilogue_file_; - bool hxx_epilogue_file_specified_; - std::string ixx_epilogue_file_; - bool ixx_epilogue_file_specified_; - std::string cxx_epilogue_file_; - bool cxx_epilogue_file_specified_; - std::string man_epilogue_file_; - bool man_epilogue_file_specified_; - std::string html_epilogue_file_; - bool html_epilogue_file_specified_; - std::string txt_epilogue_file_; - bool txt_epilogue_file_specified_; - std::string output_prefix_; - bool output_prefix_specified_; - std::string output_suffix_; - bool output_suffix_specified_; - std::string hxx_suffix_; - bool hxx_suffix_specified_; - std::string ixx_suffix_; - bool ixx_suffix_specified_; - std::string cxx_suffix_; - bool cxx_suffix_specified_; - std::string man_suffix_; - bool man_suffix_specified_; - std::string html_suffix_; - bool html_suffix_specified_; - std::string txt_suffix_; - bool txt_suffix_specified_; - std::string option_prefix_; - bool option_prefix_specified_; - std::string option_separator_; - bool option_separator_specified_; - bool keep_separator_; - bool no_combined_flags_; - bool no_combined_values_; - bool include_with_brackets_; - std::string include_prefix_; - bool include_prefix_specified_; - std::string guard_prefix_; - bool guard_prefix_specified_; - std::map reserved_name_; - bool reserved_name_specified_; - std::string options_file_; - bool options_file_specified_; -}; - -#include - -// Begin epilogue. -// -// -// End epilogue. - -#endif // CLI_OPTIONS_HXX diff --git a/cli/cli/options.ixx b/cli/cli/options.ixx deleted file mode 100644 index 4461340..0000000 --- a/cli/cli/options.ixx +++ /dev/null @@ -1,2331 +0,0 @@ -// -*- C++ -*- -// -// This file was generated by CLI, a command line interface -// compiler for C++. -// - -// Begin prologue. -// -// -// End prologue. - -#include - -namespace cli -{ - // usage_para - // - inline usage_para:: - usage_para (value v) - : v_ (v) - { - } - - // unknown_mode - // - inline unknown_mode:: - unknown_mode (value v) - : v_ (v) - { - } - - // exception - // - inline ::std::ostream& - operator<< (::std::ostream& os, const exception& e) - { - e.print (os); - return os; - } - - // unknown_option - // - inline unknown_option:: - unknown_option (const std::string& option) - : option_ (option) - { - } - - inline const std::string& unknown_option:: - option () const - { - return option_; - } - - // unknown_argument - // - inline unknown_argument:: - unknown_argument (const std::string& argument) - : argument_ (argument) - { - } - - inline const std::string& unknown_argument:: - argument () const - { - return argument_; - } - - // missing_value - // - inline missing_value:: - missing_value (const std::string& option) - : option_ (option) - { - } - - inline const std::string& missing_value:: - option () const - { - return option_; - } - - // invalid_value - // - inline invalid_value:: - invalid_value (const std::string& option, - const std::string& value, - const std::string& message) - : option_ (option), - value_ (value), - message_ (message) - { - } - - inline const std::string& invalid_value:: - option () const - { - return option_; - } - - inline const std::string& invalid_value:: - value () const - { - return value_; - } - - inline const std::string& invalid_value:: - message () const - { - return message_; - } - - // file_io_failure - // - inline file_io_failure:: - file_io_failure (const std::string& file) - : file_ (file) - { - } - - inline const std::string& file_io_failure:: - file () const - { - return file_; - } - - // unmatched_quote - // - inline unmatched_quote:: - unmatched_quote (const std::string& argument) - : argument_ (argument) - { - } - - inline const std::string& unmatched_quote:: - argument () const - { - return argument_; - } - - // argv_scanner - // - inline argv_scanner:: - argv_scanner (int& argc, char** argv, bool erase) - : i_ (1), argc_ (argc), argv_ (argv), erase_ (erase) - { - } - - inline argv_scanner:: - argv_scanner (int start, int& argc, char** argv, bool erase) - : i_ (start), argc_ (argc), argv_ (argv), erase_ (erase) - { - } - - inline int argv_scanner:: - end () const - { - return i_; - } - - // argv_file_scanner - // - inline argv_file_scanner:: - argv_file_scanner (int& argc, - char** argv, - const std::string& option, - bool erase) - : argv_scanner (argc, argv, erase), - option_ (option), - options_ (&option_info_), - options_count_ (1), - i_ (1), - skip_ (false) - { - option_info_.option = option_.c_str (); - option_info_.search_func = 0; - } - - inline argv_file_scanner:: - argv_file_scanner (int start, - int& argc, - char** argv, - const std::string& option, - bool erase) - : argv_scanner (start, argc, argv, erase), - option_ (option), - options_ (&option_info_), - options_count_ (1), - i_ (1), - skip_ (false) - { - option_info_.option = option_.c_str (); - option_info_.search_func = 0; - } - - inline argv_file_scanner:: - argv_file_scanner (const std::string& file, - const std::string& option) - : argv_scanner (0, zero_argc_, 0), - option_ (option), - options_ (&option_info_), - options_count_ (1), - i_ (1), - skip_ (false) - { - option_info_.option = option_.c_str (); - option_info_.search_func = 0; - - load (file); - } - - inline argv_file_scanner:: - argv_file_scanner (int& argc, - char** argv, - const option_info* options, - std::size_t options_count, - bool erase) - : argv_scanner (argc, argv, erase), - options_ (options), - options_count_ (options_count), - i_ (1), - skip_ (false) - { - } - - inline argv_file_scanner:: - argv_file_scanner (int start, - int& argc, - char** argv, - const option_info* options, - std::size_t options_count, - bool erase) - : argv_scanner (start, argc, argv, erase), - options_ (options), - options_count_ (options_count), - i_ (1), - skip_ (false) - { - } - - inline argv_file_scanner:: - argv_file_scanner (const std::string& file, - const option_info* options, - std::size_t options_count) - : argv_scanner (0, zero_argc_, 0), - options_ (options), - options_count_ (options_count), - i_ (1), - skip_ (false) - { - load (file); - } -} - -// options -// - -inline const std::uint64_t& options:: -build2_metadata () const -{ - return this->build2_metadata_; -} - -inline std::uint64_t& options:: -build2_metadata () -{ - return this->build2_metadata_; -} - -inline void options:: -build2_metadata (const std::uint64_t& x) -{ - this->build2_metadata_ = x; -} - -inline bool options:: -build2_metadata_specified () const -{ - return this->build2_metadata_specified_; -} - -inline void options:: -build2_metadata_specified (bool x) -{ - this->build2_metadata_specified_ = x; -} - -inline const bool& options:: -help () const -{ - return this->help_; -} - -inline bool& options:: -help () -{ - return this->help_; -} - -inline void options:: -help (const bool& x) -{ - this->help_ = x; -} - -inline const bool& options:: -version () const -{ - return this->version_; -} - -inline bool& options:: -version () -{ - return this->version_; -} - -inline void options:: -version (const bool& x) -{ - this->version_ = x; -} - -inline const std::vector& options:: -include_path () const -{ - return this->include_path_; -} - -inline std::vector& options:: -include_path () -{ - return this->include_path_; -} - -inline void options:: -include_path (const std::vector& x) -{ - this->include_path_ = x; -} - -inline bool options:: -include_path_specified () const -{ - return this->include_path_specified_; -} - -inline void options:: -include_path_specified (bool x) -{ - this->include_path_specified_ = x; -} - -inline const std::string& options:: -output_dir () const -{ - return this->output_dir_; -} - -inline std::string& options:: -output_dir () -{ - return this->output_dir_; -} - -inline void options:: -output_dir (const std::string& x) -{ - this->output_dir_ = x; -} - -inline bool options:: -output_dir_specified () const -{ - return this->output_dir_specified_; -} - -inline void options:: -output_dir_specified (bool x) -{ - this->output_dir_specified_ = x; -} - -inline const cxx_version& options:: -std () const -{ - return this->std_; -} - -inline cxx_version& options:: -std () -{ - return this->std_; -} - -inline void options:: -std (const cxx_version& x) -{ - this->std_ = x; -} - -inline bool options:: -std_specified () const -{ - return this->std_specified_; -} - -inline void options:: -std_specified (bool x) -{ - this->std_specified_ = x; -} - -inline const bool& options:: -generate_modifier () const -{ - return this->generate_modifier_; -} - -inline bool& options:: -generate_modifier () -{ - return this->generate_modifier_; -} - -inline void options:: -generate_modifier (const bool& x) -{ - this->generate_modifier_ = x; -} - -inline const bool& options:: -generate_specifier () const -{ - return this->generate_specifier_; -} - -inline bool& options:: -generate_specifier () -{ - return this->generate_specifier_; -} - -inline void options:: -generate_specifier (const bool& x) -{ - this->generate_specifier_ = x; -} - -inline const bool& options:: -generate_parse () const -{ - return this->generate_parse_; -} - -inline bool& options:: -generate_parse () -{ - return this->generate_parse_; -} - -inline void options:: -generate_parse (const bool& x) -{ - this->generate_parse_ = x; -} - -inline const bool& options:: -generate_merge () const -{ - return this->generate_merge_; -} - -inline bool& options:: -generate_merge () -{ - return this->generate_merge_; -} - -inline void options:: -generate_merge (const bool& x) -{ - this->generate_merge_ = x; -} - -inline const bool& options:: -generate_description () const -{ - return this->generate_description_; -} - -inline bool& options:: -generate_description () -{ - return this->generate_description_; -} - -inline void options:: -generate_description (const bool& x) -{ - this->generate_description_ = x; -} - -inline const bool& options:: -generate_file_scanner () const -{ - return this->generate_file_scanner_; -} - -inline bool& options:: -generate_file_scanner () -{ - return this->generate_file_scanner_; -} - -inline void options:: -generate_file_scanner (const bool& x) -{ - this->generate_file_scanner_ = x; -} - -inline const bool& options:: -generate_vector_scanner () const -{ - return this->generate_vector_scanner_; -} - -inline bool& options:: -generate_vector_scanner () -{ - return this->generate_vector_scanner_; -} - -inline void options:: -generate_vector_scanner (const bool& x) -{ - this->generate_vector_scanner_ = x; -} - -inline const bool& options:: -generate_group_scanner () const -{ - return this->generate_group_scanner_; -} - -inline bool& options:: -generate_group_scanner () -{ - return this->generate_group_scanner_; -} - -inline void options:: -generate_group_scanner (const bool& x) -{ - this->generate_group_scanner_ = x; -} - -inline const bool& options:: -suppress_inline () const -{ - return this->suppress_inline_; -} - -inline bool& options:: -suppress_inline () -{ - return this->suppress_inline_; -} - -inline void options:: -suppress_inline (const bool& x) -{ - this->suppress_inline_ = x; -} - -inline const bool& options:: -suppress_cli () const -{ - return this->suppress_cli_; -} - -inline bool& options:: -suppress_cli () -{ - return this->suppress_cli_; -} - -inline void options:: -suppress_cli (const bool& x) -{ - this->suppress_cli_ = x; -} - -inline const std::string& options:: -cli_namespace () const -{ - return this->cli_namespace_; -} - -inline std::string& options:: -cli_namespace () -{ - return this->cli_namespace_; -} - -inline void options:: -cli_namespace (const std::string& x) -{ - this->cli_namespace_ = x; -} - -inline bool options:: -cli_namespace_specified () const -{ - return this->cli_namespace_specified_; -} - -inline void options:: -cli_namespace_specified (bool x) -{ - this->cli_namespace_specified_ = x; -} - -inline const std::string& options:: -ostream_type () const -{ - return this->ostream_type_; -} - -inline std::string& options:: -ostream_type () -{ - return this->ostream_type_; -} - -inline void options:: -ostream_type (const std::string& x) -{ - this->ostream_type_ = x; -} - -inline bool options:: -ostream_type_specified () const -{ - return this->ostream_type_specified_; -} - -inline void options:: -ostream_type_specified (bool x) -{ - this->ostream_type_specified_ = x; -} - -inline const bool& options:: -generate_cxx () const -{ - return this->generate_cxx_; -} - -inline bool& options:: -generate_cxx () -{ - return this->generate_cxx_; -} - -inline void options:: -generate_cxx (const bool& x) -{ - this->generate_cxx_ = x; -} - -inline const bool& options:: -generate_man () const -{ - return this->generate_man_; -} - -inline bool& options:: -generate_man () -{ - return this->generate_man_; -} - -inline void options:: -generate_man (const bool& x) -{ - this->generate_man_ = x; -} - -inline const bool& options:: -generate_html () const -{ - return this->generate_html_; -} - -inline bool& options:: -generate_html () -{ - return this->generate_html_; -} - -inline void options:: -generate_html (const bool& x) -{ - this->generate_html_ = x; -} - -inline const bool& options:: -generate_txt () const -{ - return this->generate_txt_; -} - -inline bool& options:: -generate_txt () -{ - return this->generate_txt_; -} - -inline void options:: -generate_txt (const bool& x) -{ - this->generate_txt_ = x; -} - -inline const bool& options:: -stdout_ () const -{ - return this->stdout__; -} - -inline bool& options:: -stdout_ () -{ - return this->stdout__; -} - -inline void options:: -stdout_ (const bool& x) -{ - this->stdout__ = x; -} - -inline const bool& options:: -suppress_undocumented () const -{ - return this->suppress_undocumented_; -} - -inline bool& options:: -suppress_undocumented () -{ - return this->suppress_undocumented_; -} - -inline void options:: -suppress_undocumented (const bool& x) -{ - this->suppress_undocumented_ = x; -} - -inline const bool& options:: -suppress_usage () const -{ - return this->suppress_usage_; -} - -inline bool& options:: -suppress_usage () -{ - return this->suppress_usage_; -} - -inline void options:: -suppress_usage (const bool& x) -{ - this->suppress_usage_ = x; -} - -inline const bool& options:: -long_usage () const -{ - return this->long_usage_; -} - -inline bool& options:: -long_usage () -{ - return this->long_usage_; -} - -inline void options:: -long_usage (const bool& x) -{ - this->long_usage_ = x; -} - -inline const bool& options:: -short_usage () const -{ - return this->short_usage_; -} - -inline bool& options:: -short_usage () -{ - return this->short_usage_; -} - -inline void options:: -short_usage (const bool& x) -{ - this->short_usage_ = x; -} - -inline const std::string& options:: -page_usage () const -{ - return this->page_usage_; -} - -inline std::string& options:: -page_usage () -{ - return this->page_usage_; -} - -inline void options:: -page_usage (const std::string& x) -{ - this->page_usage_ = x; -} - -inline bool options:: -page_usage_specified () const -{ - return this->page_usage_specified_; -} - -inline void options:: -page_usage_specified (bool x) -{ - this->page_usage_specified_ = x; -} - -inline const std::size_t& options:: -option_length () const -{ - return this->option_length_; -} - -inline std::size_t& options:: -option_length () -{ - return this->option_length_; -} - -inline void options:: -option_length (const std::size_t& x) -{ - this->option_length_ = x; -} - -inline bool options:: -option_length_specified () const -{ - return this->option_length_specified_; -} - -inline void options:: -option_length_specified (bool x) -{ - this->option_length_specified_ = x; -} - -inline const bool& options:: -ansi_color () const -{ - return this->ansi_color_; -} - -inline bool& options:: -ansi_color () -{ - return this->ansi_color_; -} - -inline void options:: -ansi_color (const bool& x) -{ - this->ansi_color_ = x; -} - -inline const bool& options:: -exclude_base () const -{ - return this->exclude_base_; -} - -inline bool& options:: -exclude_base () -{ - return this->exclude_base_; -} - -inline void options:: -exclude_base (const bool& x) -{ - this->exclude_base_ = x; -} - -inline const bool& options:: -include_base_last () const -{ - return this->include_base_last_; -} - -inline bool& options:: -include_base_last () -{ - return this->include_base_last_; -} - -inline void options:: -include_base_last (const bool& x) -{ - this->include_base_last_ = x; -} - -inline const std::map& options:: -class_doc () const -{ - return this->class_doc_; -} - -inline std::map& options:: -class_doc () -{ - return this->class_doc_; -} - -inline void options:: -class_doc (const std::map& x) -{ - this->class_doc_ = x; -} - -inline bool options:: -class_doc_specified () const -{ - return this->class_doc_specified_; -} - -inline void options:: -class_doc_specified (bool x) -{ - this->class_doc_specified_ = x; -} - -inline const std::vector& options:: -class_ () const -{ - return this->class__; -} - -inline std::vector& options:: -class_ () -{ - return this->class__; -} - -inline void options:: -class_ (const std::vector& x) -{ - this->class__ = x; -} - -inline bool options:: -class__specified () const -{ - return this->class__specified_; -} - -inline void options:: -class__specified (bool x) -{ - this->class__specified_ = x; -} - -inline const std::map& options:: -docvar () const -{ - return this->docvar_; -} - -inline std::map& options:: -docvar () -{ - return this->docvar_; -} - -inline void options:: -docvar (const std::map& x) -{ - this->docvar_ = x; -} - -inline bool options:: -docvar_specified () const -{ - return this->docvar_specified_; -} - -inline void options:: -docvar_specified (bool x) -{ - this->docvar_specified_ = x; -} - -inline const std::vector& options:: -link_regex () const -{ - return this->link_regex_; -} - -inline std::vector& options:: -link_regex () -{ - return this->link_regex_; -} - -inline void options:: -link_regex (const std::vector& x) -{ - this->link_regex_ = x; -} - -inline bool options:: -link_regex_specified () const -{ - return this->link_regex_specified_; -} - -inline void options:: -link_regex_specified (bool x) -{ - this->link_regex_specified_ = x; -} - -inline const bool& options:: -link_regex_trace () const -{ - return this->link_regex_trace_; -} - -inline bool& options:: -link_regex_trace () -{ - return this->link_regex_trace_; -} - -inline void options:: -link_regex_trace (const bool& x) -{ - this->link_regex_trace_ = x; -} - -inline const std::map& options:: -html_heading_map () const -{ - return this->html_heading_map_; -} - -inline std::map& options:: -html_heading_map () -{ - return this->html_heading_map_; -} - -inline void options:: -html_heading_map (const std::map& x) -{ - this->html_heading_map_ = x; -} - -inline bool options:: -html_heading_map_specified () const -{ - return this->html_heading_map_specified_; -} - -inline void options:: -html_heading_map_specified (bool x) -{ - this->html_heading_map_specified_ = x; -} - -inline const bool& options:: -omit_link_check () const -{ - return this->omit_link_check_; -} - -inline bool& options:: -omit_link_check () -{ - return this->omit_link_check_; -} - -inline void options:: -omit_link_check (const bool& x) -{ - this->omit_link_check_ = x; -} - -inline const std::vector& options:: -hxx_prologue () const -{ - return this->hxx_prologue_; -} - -inline std::vector& options:: -hxx_prologue () -{ - return this->hxx_prologue_; -} - -inline void options:: -hxx_prologue (const std::vector& x) -{ - this->hxx_prologue_ = x; -} - -inline bool options:: -hxx_prologue_specified () const -{ - return this->hxx_prologue_specified_; -} - -inline void options:: -hxx_prologue_specified (bool x) -{ - this->hxx_prologue_specified_ = x; -} - -inline const std::vector& options:: -ixx_prologue () const -{ - return this->ixx_prologue_; -} - -inline std::vector& options:: -ixx_prologue () -{ - return this->ixx_prologue_; -} - -inline void options:: -ixx_prologue (const std::vector& x) -{ - this->ixx_prologue_ = x; -} - -inline bool options:: -ixx_prologue_specified () const -{ - return this->ixx_prologue_specified_; -} - -inline void options:: -ixx_prologue_specified (bool x) -{ - this->ixx_prologue_specified_ = x; -} - -inline const std::vector& options:: -cxx_prologue () const -{ - return this->cxx_prologue_; -} - -inline std::vector& options:: -cxx_prologue () -{ - return this->cxx_prologue_; -} - -inline void options:: -cxx_prologue (const std::vector& x) -{ - this->cxx_prologue_ = x; -} - -inline bool options:: -cxx_prologue_specified () const -{ - return this->cxx_prologue_specified_; -} - -inline void options:: -cxx_prologue_specified (bool x) -{ - this->cxx_prologue_specified_ = x; -} - -inline const std::vector& options:: -man_prologue () const -{ - return this->man_prologue_; -} - -inline std::vector& options:: -man_prologue () -{ - return this->man_prologue_; -} - -inline void options:: -man_prologue (const std::vector& x) -{ - this->man_prologue_ = x; -} - -inline bool options:: -man_prologue_specified () const -{ - return this->man_prologue_specified_; -} - -inline void options:: -man_prologue_specified (bool x) -{ - this->man_prologue_specified_ = x; -} - -inline const std::vector& options:: -html_prologue () const -{ - return this->html_prologue_; -} - -inline std::vector& options:: -html_prologue () -{ - return this->html_prologue_; -} - -inline void options:: -html_prologue (const std::vector& x) -{ - this->html_prologue_ = x; -} - -inline bool options:: -html_prologue_specified () const -{ - return this->html_prologue_specified_; -} - -inline void options:: -html_prologue_specified (bool x) -{ - this->html_prologue_specified_ = x; -} - -inline const std::vector& options:: -txt_prologue () const -{ - return this->txt_prologue_; -} - -inline std::vector& options:: -txt_prologue () -{ - return this->txt_prologue_; -} - -inline void options:: -txt_prologue (const std::vector& x) -{ - this->txt_prologue_ = x; -} - -inline bool options:: -txt_prologue_specified () const -{ - return this->txt_prologue_specified_; -} - -inline void options:: -txt_prologue_specified (bool x) -{ - this->txt_prologue_specified_ = x; -} - -inline const std::vector& options:: -hxx_epilogue () const -{ - return this->hxx_epilogue_; -} - -inline std::vector& options:: -hxx_epilogue () -{ - return this->hxx_epilogue_; -} - -inline void options:: -hxx_epilogue (const std::vector& x) -{ - this->hxx_epilogue_ = x; -} - -inline bool options:: -hxx_epilogue_specified () const -{ - return this->hxx_epilogue_specified_; -} - -inline void options:: -hxx_epilogue_specified (bool x) -{ - this->hxx_epilogue_specified_ = x; -} - -inline const std::vector& options:: -ixx_epilogue () const -{ - return this->ixx_epilogue_; -} - -inline std::vector& options:: -ixx_epilogue () -{ - return this->ixx_epilogue_; -} - -inline void options:: -ixx_epilogue (const std::vector& x) -{ - this->ixx_epilogue_ = x; -} - -inline bool options:: -ixx_epilogue_specified () const -{ - return this->ixx_epilogue_specified_; -} - -inline void options:: -ixx_epilogue_specified (bool x) -{ - this->ixx_epilogue_specified_ = x; -} - -inline const std::vector& options:: -cxx_epilogue () const -{ - return this->cxx_epilogue_; -} - -inline std::vector& options:: -cxx_epilogue () -{ - return this->cxx_epilogue_; -} - -inline void options:: -cxx_epilogue (const std::vector& x) -{ - this->cxx_epilogue_ = x; -} - -inline bool options:: -cxx_epilogue_specified () const -{ - return this->cxx_epilogue_specified_; -} - -inline void options:: -cxx_epilogue_specified (bool x) -{ - this->cxx_epilogue_specified_ = x; -} - -inline const std::vector& options:: -man_epilogue () const -{ - return this->man_epilogue_; -} - -inline std::vector& options:: -man_epilogue () -{ - return this->man_epilogue_; -} - -inline void options:: -man_epilogue (const std::vector& x) -{ - this->man_epilogue_ = x; -} - -inline bool options:: -man_epilogue_specified () const -{ - return this->man_epilogue_specified_; -} - -inline void options:: -man_epilogue_specified (bool x) -{ - this->man_epilogue_specified_ = x; -} - -inline const std::vector& options:: -html_epilogue () const -{ - return this->html_epilogue_; -} - -inline std::vector& options:: -html_epilogue () -{ - return this->html_epilogue_; -} - -inline void options:: -html_epilogue (const std::vector& x) -{ - this->html_epilogue_ = x; -} - -inline bool options:: -html_epilogue_specified () const -{ - return this->html_epilogue_specified_; -} - -inline void options:: -html_epilogue_specified (bool x) -{ - this->html_epilogue_specified_ = x; -} - -inline const std::vector& options:: -txt_epilogue () const -{ - return this->txt_epilogue_; -} - -inline std::vector& options:: -txt_epilogue () -{ - return this->txt_epilogue_; -} - -inline void options:: -txt_epilogue (const std::vector& x) -{ - this->txt_epilogue_ = x; -} - -inline bool options:: -txt_epilogue_specified () const -{ - return this->txt_epilogue_specified_; -} - -inline void options:: -txt_epilogue_specified (bool x) -{ - this->txt_epilogue_specified_ = x; -} - -inline const std::string& options:: -hxx_prologue_file () const -{ - return this->hxx_prologue_file_; -} - -inline std::string& options:: -hxx_prologue_file () -{ - return this->hxx_prologue_file_; -} - -inline void options:: -hxx_prologue_file (const std::string& x) -{ - this->hxx_prologue_file_ = x; -} - -inline bool options:: -hxx_prologue_file_specified () const -{ - return this->hxx_prologue_file_specified_; -} - -inline void options:: -hxx_prologue_file_specified (bool x) -{ - this->hxx_prologue_file_specified_ = x; -} - -inline const std::string& options:: -ixx_prologue_file () const -{ - return this->ixx_prologue_file_; -} - -inline std::string& options:: -ixx_prologue_file () -{ - return this->ixx_prologue_file_; -} - -inline void options:: -ixx_prologue_file (const std::string& x) -{ - this->ixx_prologue_file_ = x; -} - -inline bool options:: -ixx_prologue_file_specified () const -{ - return this->ixx_prologue_file_specified_; -} - -inline void options:: -ixx_prologue_file_specified (bool x) -{ - this->ixx_prologue_file_specified_ = x; -} - -inline const std::string& options:: -cxx_prologue_file () const -{ - return this->cxx_prologue_file_; -} - -inline std::string& options:: -cxx_prologue_file () -{ - return this->cxx_prologue_file_; -} - -inline void options:: -cxx_prologue_file (const std::string& x) -{ - this->cxx_prologue_file_ = x; -} - -inline bool options:: -cxx_prologue_file_specified () const -{ - return this->cxx_prologue_file_specified_; -} - -inline void options:: -cxx_prologue_file_specified (bool x) -{ - this->cxx_prologue_file_specified_ = x; -} - -inline const std::string& options:: -man_prologue_file () const -{ - return this->man_prologue_file_; -} - -inline std::string& options:: -man_prologue_file () -{ - return this->man_prologue_file_; -} - -inline void options:: -man_prologue_file (const std::string& x) -{ - this->man_prologue_file_ = x; -} - -inline bool options:: -man_prologue_file_specified () const -{ - return this->man_prologue_file_specified_; -} - -inline void options:: -man_prologue_file_specified (bool x) -{ - this->man_prologue_file_specified_ = x; -} - -inline const std::string& options:: -html_prologue_file () const -{ - return this->html_prologue_file_; -} - -inline std::string& options:: -html_prologue_file () -{ - return this->html_prologue_file_; -} - -inline void options:: -html_prologue_file (const std::string& x) -{ - this->html_prologue_file_ = x; -} - -inline bool options:: -html_prologue_file_specified () const -{ - return this->html_prologue_file_specified_; -} - -inline void options:: -html_prologue_file_specified (bool x) -{ - this->html_prologue_file_specified_ = x; -} - -inline const std::string& options:: -txt_prologue_file () const -{ - return this->txt_prologue_file_; -} - -inline std::string& options:: -txt_prologue_file () -{ - return this->txt_prologue_file_; -} - -inline void options:: -txt_prologue_file (const std::string& x) -{ - this->txt_prologue_file_ = x; -} - -inline bool options:: -txt_prologue_file_specified () const -{ - return this->txt_prologue_file_specified_; -} - -inline void options:: -txt_prologue_file_specified (bool x) -{ - this->txt_prologue_file_specified_ = x; -} - -inline const std::string& options:: -hxx_epilogue_file () const -{ - return this->hxx_epilogue_file_; -} - -inline std::string& options:: -hxx_epilogue_file () -{ - return this->hxx_epilogue_file_; -} - -inline void options:: -hxx_epilogue_file (const std::string& x) -{ - this->hxx_epilogue_file_ = x; -} - -inline bool options:: -hxx_epilogue_file_specified () const -{ - return this->hxx_epilogue_file_specified_; -} - -inline void options:: -hxx_epilogue_file_specified (bool x) -{ - this->hxx_epilogue_file_specified_ = x; -} - -inline const std::string& options:: -ixx_epilogue_file () const -{ - return this->ixx_epilogue_file_; -} - -inline std::string& options:: -ixx_epilogue_file () -{ - return this->ixx_epilogue_file_; -} - -inline void options:: -ixx_epilogue_file (const std::string& x) -{ - this->ixx_epilogue_file_ = x; -} - -inline bool options:: -ixx_epilogue_file_specified () const -{ - return this->ixx_epilogue_file_specified_; -} - -inline void options:: -ixx_epilogue_file_specified (bool x) -{ - this->ixx_epilogue_file_specified_ = x; -} - -inline const std::string& options:: -cxx_epilogue_file () const -{ - return this->cxx_epilogue_file_; -} - -inline std::string& options:: -cxx_epilogue_file () -{ - return this->cxx_epilogue_file_; -} - -inline void options:: -cxx_epilogue_file (const std::string& x) -{ - this->cxx_epilogue_file_ = x; -} - -inline bool options:: -cxx_epilogue_file_specified () const -{ - return this->cxx_epilogue_file_specified_; -} - -inline void options:: -cxx_epilogue_file_specified (bool x) -{ - this->cxx_epilogue_file_specified_ = x; -} - -inline const std::string& options:: -man_epilogue_file () const -{ - return this->man_epilogue_file_; -} - -inline std::string& options:: -man_epilogue_file () -{ - return this->man_epilogue_file_; -} - -inline void options:: -man_epilogue_file (const std::string& x) -{ - this->man_epilogue_file_ = x; -} - -inline bool options:: -man_epilogue_file_specified () const -{ - return this->man_epilogue_file_specified_; -} - -inline void options:: -man_epilogue_file_specified (bool x) -{ - this->man_epilogue_file_specified_ = x; -} - -inline const std::string& options:: -html_epilogue_file () const -{ - return this->html_epilogue_file_; -} - -inline std::string& options:: -html_epilogue_file () -{ - return this->html_epilogue_file_; -} - -inline void options:: -html_epilogue_file (const std::string& x) -{ - this->html_epilogue_file_ = x; -} - -inline bool options:: -html_epilogue_file_specified () const -{ - return this->html_epilogue_file_specified_; -} - -inline void options:: -html_epilogue_file_specified (bool x) -{ - this->html_epilogue_file_specified_ = x; -} - -inline const std::string& options:: -txt_epilogue_file () const -{ - return this->txt_epilogue_file_; -} - -inline std::string& options:: -txt_epilogue_file () -{ - return this->txt_epilogue_file_; -} - -inline void options:: -txt_epilogue_file (const std::string& x) -{ - this->txt_epilogue_file_ = x; -} - -inline bool options:: -txt_epilogue_file_specified () const -{ - return this->txt_epilogue_file_specified_; -} - -inline void options:: -txt_epilogue_file_specified (bool x) -{ - this->txt_epilogue_file_specified_ = x; -} - -inline const std::string& options:: -output_prefix () const -{ - return this->output_prefix_; -} - -inline std::string& options:: -output_prefix () -{ - return this->output_prefix_; -} - -inline void options:: -output_prefix (const std::string& x) -{ - this->output_prefix_ = x; -} - -inline bool options:: -output_prefix_specified () const -{ - return this->output_prefix_specified_; -} - -inline void options:: -output_prefix_specified (bool x) -{ - this->output_prefix_specified_ = x; -} - -inline const std::string& options:: -output_suffix () const -{ - return this->output_suffix_; -} - -inline std::string& options:: -output_suffix () -{ - return this->output_suffix_; -} - -inline void options:: -output_suffix (const std::string& x) -{ - this->output_suffix_ = x; -} - -inline bool options:: -output_suffix_specified () const -{ - return this->output_suffix_specified_; -} - -inline void options:: -output_suffix_specified (bool x) -{ - this->output_suffix_specified_ = x; -} - -inline const std::string& options:: -hxx_suffix () const -{ - return this->hxx_suffix_; -} - -inline std::string& options:: -hxx_suffix () -{ - return this->hxx_suffix_; -} - -inline void options:: -hxx_suffix (const std::string& x) -{ - this->hxx_suffix_ = x; -} - -inline bool options:: -hxx_suffix_specified () const -{ - return this->hxx_suffix_specified_; -} - -inline void options:: -hxx_suffix_specified (bool x) -{ - this->hxx_suffix_specified_ = x; -} - -inline const std::string& options:: -ixx_suffix () const -{ - return this->ixx_suffix_; -} - -inline std::string& options:: -ixx_suffix () -{ - return this->ixx_suffix_; -} - -inline void options:: -ixx_suffix (const std::string& x) -{ - this->ixx_suffix_ = x; -} - -inline bool options:: -ixx_suffix_specified () const -{ - return this->ixx_suffix_specified_; -} - -inline void options:: -ixx_suffix_specified (bool x) -{ - this->ixx_suffix_specified_ = x; -} - -inline const std::string& options:: -cxx_suffix () const -{ - return this->cxx_suffix_; -} - -inline std::string& options:: -cxx_suffix () -{ - return this->cxx_suffix_; -} - -inline void options:: -cxx_suffix (const std::string& x) -{ - this->cxx_suffix_ = x; -} - -inline bool options:: -cxx_suffix_specified () const -{ - return this->cxx_suffix_specified_; -} - -inline void options:: -cxx_suffix_specified (bool x) -{ - this->cxx_suffix_specified_ = x; -} - -inline const std::string& options:: -man_suffix () const -{ - return this->man_suffix_; -} - -inline std::string& options:: -man_suffix () -{ - return this->man_suffix_; -} - -inline void options:: -man_suffix (const std::string& x) -{ - this->man_suffix_ = x; -} - -inline bool options:: -man_suffix_specified () const -{ - return this->man_suffix_specified_; -} - -inline void options:: -man_suffix_specified (bool x) -{ - this->man_suffix_specified_ = x; -} - -inline const std::string& options:: -html_suffix () const -{ - return this->html_suffix_; -} - -inline std::string& options:: -html_suffix () -{ - return this->html_suffix_; -} - -inline void options:: -html_suffix (const std::string& x) -{ - this->html_suffix_ = x; -} - -inline bool options:: -html_suffix_specified () const -{ - return this->html_suffix_specified_; -} - -inline void options:: -html_suffix_specified (bool x) -{ - this->html_suffix_specified_ = x; -} - -inline const std::string& options:: -txt_suffix () const -{ - return this->txt_suffix_; -} - -inline std::string& options:: -txt_suffix () -{ - return this->txt_suffix_; -} - -inline void options:: -txt_suffix (const std::string& x) -{ - this->txt_suffix_ = x; -} - -inline bool options:: -txt_suffix_specified () const -{ - return this->txt_suffix_specified_; -} - -inline void options:: -txt_suffix_specified (bool x) -{ - this->txt_suffix_specified_ = x; -} - -inline const std::string& options:: -option_prefix () const -{ - return this->option_prefix_; -} - -inline std::string& options:: -option_prefix () -{ - return this->option_prefix_; -} - -inline void options:: -option_prefix (const std::string& x) -{ - this->option_prefix_ = x; -} - -inline bool options:: -option_prefix_specified () const -{ - return this->option_prefix_specified_; -} - -inline void options:: -option_prefix_specified (bool x) -{ - this->option_prefix_specified_ = x; -} - -inline const std::string& options:: -option_separator () const -{ - return this->option_separator_; -} - -inline std::string& options:: -option_separator () -{ - return this->option_separator_; -} - -inline void options:: -option_separator (const std::string& x) -{ - this->option_separator_ = x; -} - -inline bool options:: -option_separator_specified () const -{ - return this->option_separator_specified_; -} - -inline void options:: -option_separator_specified (bool x) -{ - this->option_separator_specified_ = x; -} - -inline const bool& options:: -keep_separator () const -{ - return this->keep_separator_; -} - -inline bool& options:: -keep_separator () -{ - return this->keep_separator_; -} - -inline void options:: -keep_separator (const bool& x) -{ - this->keep_separator_ = x; -} - -inline const bool& options:: -no_combined_flags () const -{ - return this->no_combined_flags_; -} - -inline bool& options:: -no_combined_flags () -{ - return this->no_combined_flags_; -} - -inline void options:: -no_combined_flags (const bool& x) -{ - this->no_combined_flags_ = x; -} - -inline const bool& options:: -no_combined_values () const -{ - return this->no_combined_values_; -} - -inline bool& options:: -no_combined_values () -{ - return this->no_combined_values_; -} - -inline void options:: -no_combined_values (const bool& x) -{ - this->no_combined_values_ = x; -} - -inline const bool& options:: -include_with_brackets () const -{ - return this->include_with_brackets_; -} - -inline bool& options:: -include_with_brackets () -{ - return this->include_with_brackets_; -} - -inline void options:: -include_with_brackets (const bool& x) -{ - this->include_with_brackets_ = x; -} - -inline const std::string& options:: -include_prefix () const -{ - return this->include_prefix_; -} - -inline std::string& options:: -include_prefix () -{ - return this->include_prefix_; -} - -inline void options:: -include_prefix (const std::string& x) -{ - this->include_prefix_ = x; -} - -inline bool options:: -include_prefix_specified () const -{ - return this->include_prefix_specified_; -} - -inline void options:: -include_prefix_specified (bool x) -{ - this->include_prefix_specified_ = x; -} - -inline const std::string& options:: -guard_prefix () const -{ - return this->guard_prefix_; -} - -inline std::string& options:: -guard_prefix () -{ - return this->guard_prefix_; -} - -inline void options:: -guard_prefix (const std::string& x) -{ - this->guard_prefix_ = x; -} - -inline bool options:: -guard_prefix_specified () const -{ - return this->guard_prefix_specified_; -} - -inline void options:: -guard_prefix_specified (bool x) -{ - this->guard_prefix_specified_ = x; -} - -inline const std::map& options:: -reserved_name () const -{ - return this->reserved_name_; -} - -inline std::map& options:: -reserved_name () -{ - return this->reserved_name_; -} - -inline void options:: -reserved_name (const std::map& x) -{ - this->reserved_name_ = x; -} - -inline bool options:: -reserved_name_specified () const -{ - return this->reserved_name_specified_; -} - -inline void options:: -reserved_name_specified (bool x) -{ - this->reserved_name_specified_ = x; -} - -inline const std::string& options:: -options_file () const -{ - return this->options_file_; -} - -inline std::string& options:: -options_file () -{ - return this->options_file_; -} - -inline void options:: -options_file (const std::string& x) -{ - this->options_file_ = x; -} - -inline bool options:: -options_file_specified () const -{ - return this->options_file_specified_; -} - -inline void options:: -options_file_specified (bool x) -{ - this->options_file_specified_ = x; -} - -// Begin epilogue. -// -// -// End epilogue. -- cgit v1.1