// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`. #include #include #include namespace mbgl { namespace style { RasterLayer::RasterLayer(const std::string& layerID, const std::string& sourceID) : Layer(makeMutable(LayerType::Raster, layerID, sourceID)) { } RasterLayer::RasterLayer(Immutable impl_) : Layer(std::move(impl_)) { } RasterLayer::~RasterLayer() = default; const RasterLayer::Impl& RasterLayer::impl() const { return static_cast(*baseImpl); } Mutable RasterLayer::mutableImpl() const { return makeMutable(impl()); } std::unique_ptr RasterLayer::cloneRef(const std::string& id_) const { auto impl_ = mutableImpl(); impl_->id = id_; impl_->paint = RasterPaintProperties::Cascading(); return std::make_unique(std::move(impl_)); } void RasterLayer::Impl::stringifyLayout(rapidjson::Writer&) const { } // Source const std::string& RasterLayer::getSourceID() const { return impl().source; } // Visibility void RasterLayer::setVisibility(VisibilityType value) { if (value == getVisibility()) return; auto impl_ = mutableImpl(); impl_->visibility = value; baseImpl = std::move(impl_); observer->onLayerVisibilityChanged(*this); } // Zoom range void RasterLayer::setMinZoom(float minZoom) { auto impl_ = mutableImpl(); impl_->minZoom = minZoom; baseImpl = std::move(impl_); } void RasterLayer::setMaxZoom(float maxZoom) { auto impl_ = mutableImpl(); impl_->maxZoom = maxZoom; baseImpl = std::move(impl_); } // Layout properties // Paint properties PropertyValue RasterLayer::getDefaultRasterOpacity() { return { 1 }; } PropertyValue RasterLayer::getRasterOpacity(const optional& klass) const { return impl().paint.template get().get(klass); } void RasterLayer::setRasterOpacity(PropertyValue value, const optional& klass) { if (value == getRasterOpacity(klass)) return; auto impl_ = mutableImpl(); impl_->paint.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void RasterLayer::setRasterOpacityTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->paint.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions RasterLayer::getRasterOpacityTransition(const optional& klass) const { return impl().paint.template get().getTransition(klass); } PropertyValue RasterLayer::getDefaultRasterHueRotate() { return { 0 }; } PropertyValue RasterLayer::getRasterHueRotate(const optional& klass) const { return impl().paint.template get().get(klass); } void RasterLayer::setRasterHueRotate(PropertyValue value, const optional& klass) { if (value == getRasterHueRotate(klass)) return; auto impl_ = mutableImpl(); impl_->paint.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void RasterLayer::setRasterHueRotateTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->paint.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions RasterLayer::getRasterHueRotateTransition(const optional& klass) const { return impl().paint.template get().getTransition(klass); } PropertyValue RasterLayer::getDefaultRasterBrightnessMin() { return { 0 }; } PropertyValue RasterLayer::getRasterBrightnessMin(const optional& klass) const { return impl().paint.template get().get(klass); } void RasterLayer::setRasterBrightnessMin(PropertyValue value, const optional& klass) { if (value == getRasterBrightnessMin(klass)) return; auto impl_ = mutableImpl(); impl_->paint.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void RasterLayer::setRasterBrightnessMinTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->paint.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions RasterLayer::getRasterBrightnessMinTransition(const optional& klass) const { return impl().paint.template get().getTransition(klass); } PropertyValue RasterLayer::getDefaultRasterBrightnessMax() { return { 1 }; } PropertyValue RasterLayer::getRasterBrightnessMax(const optional& klass) const { return impl().paint.template get().get(klass); } void RasterLayer::setRasterBrightnessMax(PropertyValue value, const optional& klass) { if (value == getRasterBrightnessMax(klass)) return; auto impl_ = mutableImpl(); impl_->paint.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void RasterLayer::setRasterBrightnessMaxTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->paint.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions RasterLayer::getRasterBrightnessMaxTransition(const optional& klass) const { return impl().paint.template get().getTransition(klass); } PropertyValue RasterLayer::getDefaultRasterSaturation() { return { 0 }; } PropertyValue RasterLayer::getRasterSaturation(const optional& klass) const { return impl().paint.template get().get(klass); } void RasterLayer::setRasterSaturation(PropertyValue value, const optional& klass) { if (value == getRasterSaturation(klass)) return; auto impl_ = mutableImpl(); impl_->paint.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void RasterLayer::setRasterSaturationTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->paint.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions RasterLayer::getRasterSaturationTransition(const optional& klass) const { return impl().paint.template get().getTransition(klass); } PropertyValue RasterLayer::getDefaultRasterContrast() { return { 0 }; } PropertyValue RasterLayer::getRasterContrast(const optional& klass) const { return impl().paint.template get().get(klass); } void RasterLayer::setRasterContrast(PropertyValue value, const optional& klass) { if (value == getRasterContrast(klass)) return; auto impl_ = mutableImpl(); impl_->paint.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void RasterLayer::setRasterContrastTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->paint.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions RasterLayer::getRasterContrastTransition(const optional& klass) const { return impl().paint.template get().getTransition(klass); } PropertyValue RasterLayer::getDefaultRasterFadeDuration() { return { 300 }; } PropertyValue RasterLayer::getRasterFadeDuration(const optional& klass) const { return impl().paint.template get().get(klass); } void RasterLayer::setRasterFadeDuration(PropertyValue value, const optional& klass) { if (value == getRasterFadeDuration(klass)) return; auto impl_ = mutableImpl(); impl_->paint.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void RasterLayer::setRasterFadeDurationTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->paint.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions RasterLayer::getRasterFadeDurationTransition(const optional& klass) const { return impl().paint.template get().getTransition(klass); } } // namespace style } // namespace mbgl