[core] Separate header for StyleProperty
This commit is contained in:
@@ -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.
|
||||
|
||||
20
include/mbgl/style/style_property.hpp
Normal file
20
include/mbgl/style/style_property.hpp
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user