diff options
Diffstat (limited to 'include/mbgl/style/data_driven_property_value.hpp')
-rw-r--r-- | include/mbgl/style/data_driven_property_value.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mbgl/style/data_driven_property_value.hpp b/include/mbgl/style/data_driven_property_value.hpp index 5d7c596363..0a1fce29c7 100644 --- a/include/mbgl/style/data_driven_property_value.hpp +++ b/include/mbgl/style/data_driven_property_value.hpp @@ -50,6 +50,15 @@ public: return !value.template is<CameraFunction<T>>() && !value.template is<CompositeFunction<T>>(); } + bool isExpression() const { + return value.match( + [] (const Undefined&) { return false; }, + [] (const T&) { return false; }, + [] (const CameraFunction<T>& fn) { return fn.isExpression; }, + [] (const SourceFunction<T>& fn) { return fn.isExpression; }, + [] (const CompositeFunction<T>& fn) { return fn.isExpression; }); + } + template <class... Ts> auto match(Ts&&... ts) const { return value.match(std::forward<Ts>(ts)...); |