summaryrefslogtreecommitdiff
path: root/src/cam/options.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-03-22 02:08:51 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-03-25 21:56:30 +0100
commitaf45435014aad8497fbb71d9be53ab3f890a22e4 (patch)
tree09f820dee8cc898037e137f389d5fc58706fb988 /src/cam/options.h
parent945478dbc0198fed27ce885d3ec33c95c77bc69f (diff)
cam: options: Create separate enum for OptionValue types
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 <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/options.h')
-rw-r--r--src/cam/options.h11
1 files changed, 9 insertions, 2 deletions
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_;