summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-07-02 17:31:24 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-07-02 17:31:24 +0200
commit415214d75927481570cc3bb9129ab343413a9578 (patch)
treef5d774ae1fd85afdc850c02bd9f4dca55a28613a /include
parent634bb175360b26e70f8e1ec929c09969734e3539 (diff)
downloadqtlocation-mapboxgl-415214d75927481570cc3bb9129ab343413a9578.tar.gz
correctly parse array properties like *-translate
Diffstat (limited to 'include')
-rw-r--r--include/llmr/style/style_parser.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/llmr/style/style_parser.hpp b/include/llmr/style/style_parser.hpp
index 71aca68061..a1af11ef6a 100644
--- a/include/llmr/style/style_parser.hpp
+++ b/include/llmr/style/style_parser.hpp
@@ -65,13 +65,18 @@ private:
// Parses optional properties into style class properties.
template <typename T>
- bool parseStyleProperty(const char *property_name, PropertyKey key, ClassProperties &klass, JSVal value);
+ bool parseOptionalProperty(const char *property_name, PropertyKey key, ClassProperties &klass, JSVal value);
template <typename T>
- bool parseStyleProperty(const char *property_name, T &target, JSVal value);
+ bool parseOptionalProperty(const char *property_name, const std::vector<PropertyKey> &keys, ClassProperties &klass, JSVal value);
template <typename T>
- std::tuple<bool, T> parseStyleProperty(JSVal value, const char *property_name);
+ bool parseOptionalProperty(const char *property_name, T &target, JSVal value);
template <typename T>
- bool parseStyleProperty(const char *property_name, const std::vector<PropertyKey> &keys, ClassProperties &klass, JSVal value);
+ bool setProperty(JSVal value, const char *property_name, PropertyKey key, ClassProperties &klass);
+ template <typename T>
+ bool setProperty(JSVal value, const char *property_name, T &target);
+
+ template <typename T>
+ std::tuple<bool, T> parseProperty(JSVal value, const char *property_name);
template <typename T>
bool parseFunction(PropertyKey key, ClassProperties &klass, JSVal value);