Files
MapLibreParticleLab/include/mbgl/style/property_fallback.hpp
Konstantin Käfer 4ea281c750 rename llmr => mbgl
2014-07-16 18:53:56 -07:00

30 lines
599 B
C++

#ifndef MBGL_STYLE_PROPERTY_FALLBACK
#define MBGL_STYLE_PROPERTY_FALLBACK
#include <mbgl/style/property_key.hpp>
#include <mbgl/style/property_value.hpp>
#include <map>
namespace mbgl {
class PropertyFallbackValue {
public:
static const PropertyValue &Get(PropertyKey key) {
auto it = properties.find(key);
if (it != properties.end()) {
return it->second;
} else {
return defaultProperty;
}
}
private:
static const std::map<PropertyKey, PropertyValue> properties;
static const PropertyValue defaultProperty;
};
}
#endif