summaryrefslogtreecommitdiff
path: root/src/cam/options.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-27 15:00:07 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-05-01 12:24:07 +0200
commitcdf7fbe35e60e9341809446a66a3e0637a74d743 (patch)
tree12f7b6711ab617325d110e0dddbce68a29a47f53 /src/cam/options.cpp
parente66d4f382317c1339cc46071f558affd1582062b (diff)
cam: options: Add public method to invalidate options
Extend OptionsBase<T> with a public invalidate() method. This allows for further examination of the options and if found unsuitable be invalidated. The intended user for this new interface are subclasses of KeyValueParser. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/options.cpp')
-rw-r--r--src/cam/options.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index 2c56eacf..77b3cc1f 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -65,6 +65,12 @@ const OptionValue &OptionsBase<T>::operator[](const T &opt) const
}
template<typename T>
+void OptionsBase<T>::invalidate()
+{
+ valid_ = false;
+}
+
+template<typename T>
bool OptionsBase<T>::parseValue(const T &opt, const Option &option,
const char *optarg)
{