diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-02-01 01:14:30 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-02-01 11:41:54 +0200 |
commit | 377516a084467692cb275526a16d43b25f773e46 (patch) | |
tree | e45b867689ab3e5fc08bda2d31fbe0afad7ea521 /src/cam/options.h | |
parent | 0b2822749e14ce207734ded1aa16deeeeab6369c (diff) |
cam: options: Move struct Option
The Option structure is declared within the OptionsParser, but will
later be needed by other parsers. Move it outside the OptionsParser
class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/cam/options.h')
-rw-r--r-- | src/cam/options.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/cam/options.h b/src/cam/options.h index 491f6a31..6d1b12d2 100644 --- a/src/cam/options.h +++ b/src/cam/options.h @@ -17,6 +17,17 @@ enum OptionArgument { ArgumentOptional, }; +struct Option { + int opt; + const char *name; + OptionArgument argument; + const char *argumentName; + const char *help; + + bool hasShortOption() const { return isalnum(opt); } + bool hasLongOption() const { return name != nullptr; } +}; + class OptionsParser { public: @@ -42,17 +53,6 @@ public: void usage(); private: - struct Option { - int opt; - const char *name; - OptionArgument argument; - const char *argumentName; - const char *help; - - bool hasShortOption() const { return isalnum(opt); } - bool hasLongOption() const { return name != nullptr; } - }; - std::vector<Option> options_; std::map<unsigned int, Option *> optionsMap_; }; |