diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-11-08 15:35:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-11-08 15:35:19 +0200 |
commit | 369470005607b9501a769be0ae2a4c79c90bad84 (patch) | |
tree | 459030d6b0ca4f1799d0313a5e63fc24038cd34d /cli/options.hxx | |
parent | 907b5fed58d53bbb5e25c590df97f01a0ac93733 (diff) |
Implement usage generation
Also migrate the CLI compiler usage handling to the auto-generated version.
Diffstat (limited to 'cli/options.hxx')
-rw-r--r-- | cli/options.hxx | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/cli/options.hxx b/cli/options.hxx index 4d33939..6f1210f 100644 --- a/cli/options.hxx +++ b/cli/options.hxx @@ -141,6 +141,8 @@ namespace cli #include <vector> +#include <cstddef> + class options { public: @@ -171,47 +173,57 @@ class options // Option accessors. // - public: - bool const& + const bool& help () const; - bool const& + const bool& version () const; - std::string const& + const std::string& output_dir () const; - bool const& + const bool& suppress_inline () const; - std::string const& + const bool& + suppress_usage () const; + + const std::size_t& + option_length () const; + + const std::string& hxx_suffix () const; - std::string const& + const std::string& ixx_suffix () const; - std::string const& + const std::string& cxx_suffix () const; - std::string const& + const std::string& option_prefix () const; - std::string const& + const std::string& option_separator () const; - bool const& + const bool& include_with_brackets () const; - std::string const& + const std::string& include_prefix () const; - std::string const& + const std::string& guard_prefix () const; - std::map<std::string, std::string> const& + const std::map<std::string, std::string>& reserved_name () const; + // Print usage information. + // + static void + print_usage (::std::ostream&); + private: int _parse (int start, @@ -225,6 +237,8 @@ class options bool version_; std::string output_dir_; bool suppress_inline_; + bool suppress_usage_; + std::size_t option_length_; std::string hxx_suffix_; std::string ixx_suffix_; std::string cxx_suffix_; |