// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`. #include #include #include #include namespace mbgl { namespace style { LineLayer::LineLayer(const std::string& layerID, const std::string& sourceID) : Layer(makeMutable(LayerType::Line, layerID, sourceID)) { } LineLayer::LineLayer(Immutable impl_) : Layer(std::move(impl_)) { } LineLayer::~LineLayer() = default; const LineLayer::Impl& LineLayer::impl() const { return static_cast(*baseImpl); } Mutable LineLayer::mutableImpl() const { return makeMutable(impl()); } std::unique_ptr LineLayer::cloneRef(const std::string& id_) const { auto impl_ = mutableImpl(); impl_->id = id_; impl_->cascading = LinePaintProperties::Cascading(); return std::make_unique(std::move(impl_)); } void LineLayer::Impl::stringifyLayout(rapidjson::Writer& writer) const { conversion::stringify(writer, layout); } // Source const std::string& LineLayer::getSourceID() const { return impl().source; } void LineLayer::setSourceLayer(const std::string& sourceLayer) { auto impl_ = mutableImpl(); impl_->sourceLayer = sourceLayer; baseImpl = std::move(impl_); } const std::string& LineLayer::getSourceLayer() const { return impl().sourceLayer; } // Filter void LineLayer::setFilter(const Filter& filter) { auto impl_ = mutableImpl(); impl_->filter = filter; baseImpl = std::move(impl_); observer->onLayerFilterChanged(*this); } const Filter& LineLayer::getFilter() const { return impl().filter; } // Visibility void LineLayer::setVisibility(VisibilityType value) { if (value == getVisibility()) return; auto impl_ = mutableImpl(); impl_->visibility = value; baseImpl = std::move(impl_); observer->onLayerVisibilityChanged(*this); } // Zoom range void LineLayer::setMinZoom(float minZoom) { auto impl_ = mutableImpl(); impl_->minZoom = minZoom; baseImpl = std::move(impl_); } void LineLayer::setMaxZoom(float maxZoom) { auto impl_ = mutableImpl(); impl_->maxZoom = maxZoom; baseImpl = std::move(impl_); } // Layout properties PropertyValue LineLayer::getDefaultLineCap() { return LineCap::defaultValue(); } PropertyValue LineLayer::getLineCap() const { return impl().layout.unevaluated.get(); } void LineLayer::setLineCap(PropertyValue value) { if (value == getLineCap()) return; auto impl_ = mutableImpl(); impl_->layout.unevaluated.get() = value; baseImpl = std::move(impl_); observer->onLayerLayoutPropertyChanged(*this, "line-cap"); } PropertyValue LineLayer::getDefaultLineJoin() { return LineJoin::defaultValue(); } PropertyValue LineLayer::getLineJoin() const { return impl().layout.unevaluated.get(); } void LineLayer::setLineJoin(PropertyValue value) { if (value == getLineJoin()) return; auto impl_ = mutableImpl(); impl_->layout.unevaluated.get() = value; baseImpl = std::move(impl_); observer->onLayerLayoutPropertyChanged(*this, "line-join"); } PropertyValue LineLayer::getDefaultLineMiterLimit() { return LineMiterLimit::defaultValue(); } PropertyValue LineLayer::getLineMiterLimit() const { return impl().layout.unevaluated.get(); } void LineLayer::setLineMiterLimit(PropertyValue value) { if (value == getLineMiterLimit()) return; auto impl_ = mutableImpl(); impl_->layout.unevaluated.get() = value; baseImpl = std::move(impl_); observer->onLayerLayoutPropertyChanged(*this, "line-miter-limit"); } PropertyValue LineLayer::getDefaultLineRoundLimit() { return LineRoundLimit::defaultValue(); } PropertyValue LineLayer::getLineRoundLimit() const { return impl().layout.unevaluated.get(); } void LineLayer::setLineRoundLimit(PropertyValue value) { if (value == getLineRoundLimit()) return; auto impl_ = mutableImpl(); impl_->layout.unevaluated.get() = value; baseImpl = std::move(impl_); observer->onLayerLayoutPropertyChanged(*this, "line-round-limit"); } // Paint properties DataDrivenPropertyValue LineLayer::getDefaultLineOpacity() { return { 1 }; } DataDrivenPropertyValue LineLayer::getLineOpacity(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineOpacity(DataDrivenPropertyValue value, const optional& klass) { if (value == getLineOpacity(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); } else { observer->onLayerPaintPropertyChanged(*this); } } void LineLayer::setLineOpacityTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineOpacityTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } DataDrivenPropertyValue LineLayer::getDefaultLineColor() { return { Color::black() }; } DataDrivenPropertyValue LineLayer::getLineColor(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineColor(DataDrivenPropertyValue value, const optional& klass) { if (value == getLineColor(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); } else { observer->onLayerPaintPropertyChanged(*this); } } void LineLayer::setLineColorTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineColorTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } PropertyValue> LineLayer::getDefaultLineTranslate() { return { {{ 0, 0 }} }; } PropertyValue> LineLayer::getLineTranslate(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineTranslate(PropertyValue> value, const optional& klass) { if (value == getLineTranslate(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void LineLayer::setLineTranslateTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineTranslateTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } PropertyValue LineLayer::getDefaultLineTranslateAnchor() { return { TranslateAnchorType::Map }; } PropertyValue LineLayer::getLineTranslateAnchor(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineTranslateAnchor(PropertyValue value, const optional& klass) { if (value == getLineTranslateAnchor(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void LineLayer::setLineTranslateAnchorTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineTranslateAnchorTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } PropertyValue LineLayer::getDefaultLineWidth() { return { 1 }; } PropertyValue LineLayer::getLineWidth(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineWidth(PropertyValue value, const optional& klass) { if (value == getLineWidth(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void LineLayer::setLineWidthTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineWidthTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } DataDrivenPropertyValue LineLayer::getDefaultLineGapWidth() { return { 0 }; } DataDrivenPropertyValue LineLayer::getLineGapWidth(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineGapWidth(DataDrivenPropertyValue value, const optional& klass) { if (value == getLineGapWidth(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); } else { observer->onLayerPaintPropertyChanged(*this); } } void LineLayer::setLineGapWidthTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineGapWidthTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } DataDrivenPropertyValue LineLayer::getDefaultLineOffset() { return { 0 }; } DataDrivenPropertyValue LineLayer::getLineOffset(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineOffset(DataDrivenPropertyValue value, const optional& klass) { if (value == getLineOffset(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); } else { observer->onLayerPaintPropertyChanged(*this); } } void LineLayer::setLineOffsetTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineOffsetTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } DataDrivenPropertyValue LineLayer::getDefaultLineBlur() { return { 0 }; } DataDrivenPropertyValue LineLayer::getLineBlur(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineBlur(DataDrivenPropertyValue value, const optional& klass) { if (value == getLineBlur(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); } else { observer->onLayerPaintPropertyChanged(*this); } } void LineLayer::setLineBlurTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineBlurTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } PropertyValue> LineLayer::getDefaultLineDasharray() { return { { } }; } PropertyValue> LineLayer::getLineDasharray(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLineDasharray(PropertyValue> value, const optional& klass) { if (value == getLineDasharray(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void LineLayer::setLineDasharrayTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLineDasharrayTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } PropertyValue LineLayer::getDefaultLinePattern() { return { "" }; } PropertyValue LineLayer::getLinePattern(const optional& klass) const { return impl().cascading.template get().get(klass); } void LineLayer::setLinePattern(PropertyValue value, const optional& klass) { if (value == getLinePattern(klass)) return; auto impl_ = mutableImpl(); impl_->cascading.template get().set(value, klass); baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } void LineLayer::setLinePatternTransition(const TransitionOptions& value, const optional& klass) { auto impl_ = mutableImpl(); impl_->cascading.template get().setTransition(value, klass); baseImpl = std::move(impl_); } TransitionOptions LineLayer::getLinePatternTransition(const optional& klass) const { return impl().cascading.template get().getTransition(klass); } } // namespace style } // namespace mbgl