summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-26 14:43:11 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-26 15:54:03 +0300
commit1733e29f0ac7ffe7c1aa5bf54d8f710befcdd2ea (patch)
tree9dfd6eff7e765baf751de52b1a65b618e8774f72
parente78c31c4b53326f260a4274018b5cb98fac0dbb6 (diff)
downloadqtlocation-mapboxgl-1733e29f0ac7ffe7c1aa5bf54d8f710befcdd2ea.tar.gz
[core] Separate header for StyleProperty
-rw-r--r--include/mbgl/style/layer.hpp10
-rw-r--r--include/mbgl/style/style_property.hpp20
-rw-r--r--next/CMakeLists.txt1
-rw-r--r--src/core-files.json1
4 files changed, 23 insertions, 9 deletions
diff --git a/include/mbgl/style/layer.hpp b/include/mbgl/style/layer.hpp
index 11fd429be9..849cb436be 100644
--- a/include/mbgl/style/layer.hpp
+++ b/include/mbgl/style/layer.hpp
@@ -1,8 +1,8 @@
#pragma once
#include <mbgl/style/conversion.hpp>
+#include <mbgl/style/style_property.hpp>
#include <mbgl/style/types.hpp>
-#include <mbgl/util/feature.hpp>
#include <mbgl/util/immutable.hpp>
#include <mbgl/util/optional.hpp>
@@ -66,14 +66,6 @@ struct LayerTypeInfo {
const enum class TileKind : uint8_t { Geometry, Raster, RasterDEM, NotRequired } tileKind;
};
-struct StyleProperty {
- enum class Kind : uint8_t { Undefined, Constant, Expression, Transition };
- StyleProperty(Value value_, Kind kind_) : value(std::move(value_)), kind(kind_) {}
- StyleProperty() = default;
- const Value value;
- const Kind kind = Kind::Undefined;
-};
-
/**
* The runtime representation of a [layer](https://www.mapbox.com/mapbox-gl-style-spec/#layers) from the Mapbox Style
* Specification.
diff --git a/include/mbgl/style/style_property.hpp b/include/mbgl/style/style_property.hpp
new file mode 100644
index 0000000000..43787c7919
--- /dev/null
+++ b/include/mbgl/style/style_property.hpp
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <mbgl/util/feature.hpp>
+
+namespace mbgl {
+namespace style {
+
+/**
+ * @brief Generic representation of a style property.
+ */
+struct StyleProperty {
+ enum class Kind : uint8_t { Undefined, Constant, Expression, Transition };
+ StyleProperty(Value value_, Kind kind_) : value(std::move(value_)), kind(kind_) {}
+ StyleProperty() = default;
+ const Value value;
+ const Kind kind = Kind::Undefined;
+};
+
+} // namespace style
+} // namespace mbgl
diff --git a/next/CMakeLists.txt b/next/CMakeLists.txt
index dbf6c11918..df56f04b22 100644
--- a/next/CMakeLists.txt
+++ b/next/CMakeLists.txt
@@ -189,6 +189,7 @@ add_library(
${MBGL_ROOT}/include/mbgl/style/sources/raster_source.hpp
${MBGL_ROOT}/include/mbgl/style/sources/vector_source.hpp
${MBGL_ROOT}/include/mbgl/style/style.hpp
+ ${MBGL_ROOT}/include/mbgl/style/style_property.hpp
${MBGL_ROOT}/include/mbgl/style/transition_options.hpp
${MBGL_ROOT}/include/mbgl/style/types.hpp
${MBGL_ROOT}/include/mbgl/style/undefined.hpp
diff --git a/src/core-files.json b/src/core-files.json
index a460ab86df..e5fa493312 100644
--- a/src/core-files.json
+++ b/src/core-files.json
@@ -452,6 +452,7 @@
"mbgl/style/sources/raster_source.hpp": "include/mbgl/style/sources/raster_source.hpp",
"mbgl/style/sources/vector_source.hpp": "include/mbgl/style/sources/vector_source.hpp",
"mbgl/style/style.hpp": "include/mbgl/style/style.hpp",
+ "mbgl/style/style_property.hpp": "include/mbgl/style/style_property.hpp",
"mbgl/style/transition_options.hpp": "include/mbgl/style/transition_options.hpp",
"mbgl/style/types.hpp": "include/mbgl/style/types.hpp",
"mbgl/style/undefined.hpp": "include/mbgl/style/undefined.hpp",