summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/layer.cpp.ejs
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-04-21 09:19:47 -0700
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-04-25 17:23:54 -0700
commit3c175adf30546fe58713b8fed29ac35a85e150be (patch)
tree5666e9bcf311ed1b86a13444e50dc7a030c10da9 /src/mbgl/style/layers/layer.cpp.ejs
parentea8ec38df156c6683c886253dbb1f6bc828686ff (diff)
downloadqtlocation-mapboxgl-3c175adf30546fe58713b8fed29ac35a85e150be.tar.gz
[core] split off render layers
Diffstat (limited to 'src/mbgl/style/layers/layer.cpp.ejs')
-rw-r--r--src/mbgl/style/layers/layer.cpp.ejs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs
index 76c83f474a..2f690c3158 100644
--- a/src/mbgl/style/layers/layer.cpp.ejs
+++ b/src/mbgl/style/layers/layer.cpp.ejs
@@ -14,13 +14,13 @@ namespace style {
<% if (type === 'background') { -%>
<%- camelize(type) %>Layer::<%- camelize(type) %>Layer(const std::string& layerID)
- : Layer(Type::<%- camelize(type) %>, std::make_unique<Impl>())
+ : Layer(LayerType::<%- camelize(type) %>, std::make_unique<Impl>())
, impl(static_cast<Impl*>(baseImpl.get())) {
impl->id = layerID;
}
<% } else { -%>
<%- camelize(type) %>Layer::<%- camelize(type) %>Layer(const std::string& layerID, const std::string& sourceID)
- : Layer(Type::<%- camelize(type) %>, std::make_unique<Impl>())
+ : Layer(LayerType::<%- camelize(type) %>, std::make_unique<Impl>())
, impl(static_cast<Impl*>(baseImpl.get())) {
impl->id = layerID;
impl->source = sourceID;
@@ -28,7 +28,7 @@ namespace style {
<% } -%>
<%- camelize(type) %>Layer::<%- camelize(type) %>Layer(const Impl& other)
- : Layer(Type::<%- camelize(type) %>, std::make_unique<Impl>(other))
+ : Layer(LayerType::<%- camelize(type) %>, std::make_unique<Impl>(other))
, impl(static_cast<Impl*>(baseImpl.get())) {
}
@@ -41,7 +41,7 @@ std::unique_ptr<Layer> <%- camelize(type) %>Layer::Impl::clone() const {
std::unique_ptr<Layer> <%- camelize(type) %>Layer::Impl::cloneRef(const std::string& id_) const {
auto result = std::make_unique<<%- camelize(type) %>Layer>(*this);
result->impl->id = id_;
- result->impl->paint = <%- camelize(type) %>PaintProperties();
+ result->impl->cascading = <%- camelize(type) %>PaintProperties::Cascading();
return std::move(result);
}
@@ -109,13 +109,13 @@ void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(<%- propertyV
}
<%- propertyValueType(property) %> <%- camelize(type) %>Layer::get<%- camelize(property.name) %>(const optional<std::string>& klass) const {
- return impl->paint.get<<%- camelize(property.name) %>>(klass);
+ return impl->cascading.template get<<%- camelize(property.name) %>>().get(klass);
}
void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(<%- propertyValueType(property) %> value, const optional<std::string>& klass) {
if (value == get<%- camelize(property.name) %>(klass))
return;
- impl->paint.set<<%- camelize(property.name) %>>(value, klass);
+ impl->cascading.template get<<%- camelize(property.name) %>>().set(value, klass);
<% if (isDataDriven(property)) { -%>
if (value.isDataDriven()) {
impl->observer->onLayerDataDrivenPaintPropertyChanged(*this);
@@ -128,11 +128,11 @@ void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(<%- propertyV
}
void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>Transition(const TransitionOptions& value, const optional<std::string>& klass) {
- impl->paint.setTransition<<%- camelize(property.name) %>>(value, klass);
+ impl->cascading.template get<<%- camelize(property.name) %>>().setTransition(value, klass);
}
TransitionOptions <%- camelize(type) %>Layer::get<%- camelize(property.name) %>Transition(const optional<std::string>& klass) const {
- return impl->paint.getTransition<<%- camelize(property.name) %>>(klass);
+ return impl->cascading.template get<<%- camelize(property.name) %>>().getTransition(klass);
}
<% } -%>