From 38fcbe21d48186c4630a3b8a76d1b20e156faadd Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Sun, 30 Oct 2016 11:06:59 -0700 Subject: [core] Convert style properties to a tuple-based approach This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md. The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily. Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state. --- cmake/core-files.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/core-files.cmake b/cmake/core-files.cmake index bbfec6a4c2..adbaed8333 100644 --- a/cmake/core-files.cmake +++ b/cmake/core-files.cmake @@ -236,7 +236,6 @@ set(MBGL_CORE_FILES include/mbgl/style/types.hpp src/mbgl/style/bucket_parameters.cpp src/mbgl/style/bucket_parameters.hpp - src/mbgl/style/calculation_parameters.hpp src/mbgl/style/cascade_parameters.hpp src/mbgl/style/class_dictionary.cpp src/mbgl/style/class_dictionary.hpp @@ -249,6 +248,7 @@ set(MBGL_CORE_FILES src/mbgl/style/paint_property.hpp src/mbgl/style/parser.cpp src/mbgl/style/parser.hpp + src/mbgl/style/property_evaluation_parameters.hpp src/mbgl/style/property_evaluator.cpp src/mbgl/style/property_evaluator.hpp src/mbgl/style/property_parsing.cpp @@ -442,8 +442,10 @@ set(MBGL_CORE_FILES src/mbgl/util/http_header.hpp src/mbgl/util/http_timeout.cpp src/mbgl/util/http_timeout.hpp + src/mbgl/util/ignore.hpp src/mbgl/util/i18n.cpp src/mbgl/util/i18n.hpp + src/mbgl/util/indexed_tuple.hpp src/mbgl/util/interpolate.hpp src/mbgl/util/intersection_tests.cpp src/mbgl/util/intersection_tests.hpp -- cgit v1.2.1