summaryrefslogtreecommitdiff
path: root/src/mbgl/style/class_properties.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/class_properties.hpp')
-rw-r--r--src/mbgl/style/class_properties.hpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/mbgl/style/class_properties.hpp b/src/mbgl/style/class_properties.hpp
deleted file mode 100644
index 153fc11ee7..0000000000
--- a/src/mbgl/style/class_properties.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef MBGL_STYLE_CLASS_PROPERTIES
-#define MBGL_STYLE_CLASS_PROPERTIES
-
-#include <mbgl/style/property_key.hpp>
-#include <mbgl/style/property_value.hpp>
-#include <mbgl/style/property_evaluator.hpp>
-#include <mbgl/style/property_transition.hpp>
-
-#include <map>
-
-namespace mbgl {
-
-class ClassProperties {
-public:
- inline void set(PropertyKey key, const PropertyValue &value) {
- properties.emplace(key, value);
- }
-
- inline void set(PropertyKey key, const PropertyTransition &transition) {
- transitions.emplace(key, transition);
- }
-
- PropertyTransition getTransition(PropertyKey key) const;
-
- // Route-through iterable interface so that you can iterate on the object as is.
- inline std::map<PropertyKey, PropertyValue>::const_iterator begin() const {
- return properties.begin();
- }
- inline std::map<PropertyKey, PropertyValue>::const_iterator end() const {
- return properties.end();
- }
-
- template <typename T>
- void calculate(PropertyKey key, T& target, const float z) const {
- auto it = properties.find(key);
- if (it != properties.end()) {
- target = mapbox::util::apply_visitor(PropertyEvaluator<T>(StyleCalculationParameters(z)), it->second);
- }
- }
-
-public:
- std::map<PropertyKey, PropertyValue> properties;
- std::map<PropertyKey, PropertyTransition> transitions;
-};
-
-}
-
-#endif