diff options
| author | Petr Machata <[email protected]> | 2010-09-23 19:55:25 +0200 |
|---|---|---|
| committer | Petr Machata <[email protected]> | 2010-09-23 19:55:25 +0200 |
| commit | d70afd09bc3b902ed1662fbaaccc866c765d6040 (patch) | |
| tree | 1700ddef445f319f6ee326a0ea9141be2d97f2b6 /dwarflint/option.hh | |
| parent | 75c18f5e549e400cafca2b9137c83f7c6460cf02 (diff) | |
dwarflint: Show check-local options in --help
- They are still not properly recognized
- And name mangling isn't implemented
Diffstat (limited to 'dwarflint/option.hh')
| -rw-r--r-- | dwarflint/option.hh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/dwarflint/option.hh b/dwarflint/option.hh index 4c79b58b..5f3af6f1 100644 --- a/dwarflint/option.hh +++ b/dwarflint/option.hh @@ -34,20 +34,38 @@ #include <iostream> #include "option.ii" +#include "checkdescriptor.ii" class options : private std::map<int, option_i *> { friend class option_common; - std::vector<argp_option> _m_opts; + mutable std::vector<argp_option> _m_opts; option_i *find_opt (int key) const; static error_t parse_opt (int key, char *arg, argp_state *state); public: option_i const *getopt (int key) const; - argp build_argp (); + argp build_argp () const; void add (option_i *opt); + bool empty () const + { + return std::map<int, option_i *>::empty (); + } +}; + +class argp_full +{ + std::vector<argp> _m_children_argps; + std::vector<std::string> _m_children_headers; + std::vector<argp_child> _m_children; + argp _m_argp; + +public: + argp_full (options const &global, + std::vector<checkdescriptor const *> checkdescriptors); + argp const &get () const { return _m_argp; } }; class option_i // we cannot call it simply "option", this conflicts |
