From af45435014aad8497fbb71d9be53ab3f890a22e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Fri, 22 Mar 2019 02:08:51 +0100 Subject: cam: options: Create separate enum for OptionValue types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation for support of multiple instances of the same option, create a separate enum for the OptionValue types as it will diverge from enum OptionType. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/cam/options.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/cam/options.h') diff --git a/src/cam/options.h b/src/cam/options.h index 745f4a4a..b33a90fc 100644 --- a/src/cam/options.h +++ b/src/cam/options.h @@ -79,13 +79,20 @@ private: class OptionValue { public: + enum ValueType { + ValueNone, + ValueInteger, + ValueString, + ValueKeyValue, + }; + OptionValue(); OptionValue(int value); OptionValue(const char *value); OptionValue(const std::string &value); OptionValue(const KeyValueParser::Options &value); - OptionType type() const { return type_; } + ValueType type() const { return type_; } operator int() const; operator std::string() const; @@ -96,7 +103,7 @@ public: KeyValueParser::Options toKeyValues() const; private: - OptionType type_; + ValueType type_; int integer_; std::string string_; KeyValueParser::Options keyValues_; -- cgit v1.2.1