From 9eba2a66d107f30aa9216fb34ed62df60797986a Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 10 May 2017 12:37:46 -0700 Subject: [core, node, darwin, qt] Remove support for paint classes --- src/mbgl/style/layers/line_layer.cpp | 180 +++++++++++++++++------------------ 1 file changed, 90 insertions(+), 90 deletions(-) (limited to 'src/mbgl/style/layers/line_layer.cpp') diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp index 286289b28e..96f1fa4d11 100644 --- a/src/mbgl/style/layers/line_layer.cpp +++ b/src/mbgl/style/layers/line_layer.cpp @@ -163,15 +163,15 @@ DataDrivenPropertyValue LineLayer::getDefaultLineOpacity() { return { 1 }; } -DataDrivenPropertyValue LineLayer::getLineOpacity(const optional& klass) const { - return impl().paint.template get().get(klass); +DataDrivenPropertyValue LineLayer::getLineOpacity() const { + return impl().paint.template get().value; } -void LineLayer::setLineOpacity(DataDrivenPropertyValue value, const optional& klass) { - if (value == getLineOpacity(klass)) +void LineLayer::setLineOpacity(DataDrivenPropertyValue value) { + if (value == getLineOpacity()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); @@ -180,29 +180,29 @@ void LineLayer::setLineOpacity(DataDrivenPropertyValue value, const optio } } -void LineLayer::setLineOpacityTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineOpacityTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineOpacityTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineOpacityTransition() const { + return impl().paint.template get().options; } DataDrivenPropertyValue LineLayer::getDefaultLineColor() { return { Color::black() }; } -DataDrivenPropertyValue LineLayer::getLineColor(const optional& klass) const { - return impl().paint.template get().get(klass); +DataDrivenPropertyValue LineLayer::getLineColor() const { + return impl().paint.template get().value; } -void LineLayer::setLineColor(DataDrivenPropertyValue value, const optional& klass) { - if (value == getLineColor(klass)) +void LineLayer::setLineColor(DataDrivenPropertyValue value) { + if (value == getLineColor()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); @@ -211,110 +211,110 @@ void LineLayer::setLineColor(DataDrivenPropertyValue value, const optiona } } -void LineLayer::setLineColorTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineColorTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineColorTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineColorTransition() const { + return impl().paint.template get().options; } PropertyValue> LineLayer::getDefaultLineTranslate() { return { {{ 0, 0 }} }; } -PropertyValue> LineLayer::getLineTranslate(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue> LineLayer::getLineTranslate() const { + return impl().paint.template get().value; } -void LineLayer::setLineTranslate(PropertyValue> value, const optional& klass) { - if (value == getLineTranslate(klass)) +void LineLayer::setLineTranslate(PropertyValue> value) { + if (value == getLineTranslate()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void LineLayer::setLineTranslateTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineTranslateTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineTranslateTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineTranslateTransition() const { + return impl().paint.template get().options; } PropertyValue LineLayer::getDefaultLineTranslateAnchor() { return { TranslateAnchorType::Map }; } -PropertyValue LineLayer::getLineTranslateAnchor(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue LineLayer::getLineTranslateAnchor() const { + return impl().paint.template get().value; } -void LineLayer::setLineTranslateAnchor(PropertyValue value, const optional& klass) { - if (value == getLineTranslateAnchor(klass)) +void LineLayer::setLineTranslateAnchor(PropertyValue value) { + if (value == getLineTranslateAnchor()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void LineLayer::setLineTranslateAnchorTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineTranslateAnchorTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineTranslateAnchorTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineTranslateAnchorTransition() const { + return impl().paint.template get().options; } PropertyValue LineLayer::getDefaultLineWidth() { return { 1 }; } -PropertyValue LineLayer::getLineWidth(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue LineLayer::getLineWidth() const { + return impl().paint.template get().value; } -void LineLayer::setLineWidth(PropertyValue value, const optional& klass) { - if (value == getLineWidth(klass)) +void LineLayer::setLineWidth(PropertyValue value) { + if (value == getLineWidth()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void LineLayer::setLineWidthTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineWidthTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineWidthTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineWidthTransition() const { + return impl().paint.template get().options; } DataDrivenPropertyValue LineLayer::getDefaultLineGapWidth() { return { 0 }; } -DataDrivenPropertyValue LineLayer::getLineGapWidth(const optional& klass) const { - return impl().paint.template get().get(klass); +DataDrivenPropertyValue LineLayer::getLineGapWidth() const { + return impl().paint.template get().value; } -void LineLayer::setLineGapWidth(DataDrivenPropertyValue value, const optional& klass) { - if (value == getLineGapWidth(klass)) +void LineLayer::setLineGapWidth(DataDrivenPropertyValue value) { + if (value == getLineGapWidth()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); @@ -323,29 +323,29 @@ void LineLayer::setLineGapWidth(DataDrivenPropertyValue value, const opti } } -void LineLayer::setLineGapWidthTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineGapWidthTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineGapWidthTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineGapWidthTransition() const { + return impl().paint.template get().options; } DataDrivenPropertyValue LineLayer::getDefaultLineOffset() { return { 0 }; } -DataDrivenPropertyValue LineLayer::getLineOffset(const optional& klass) const { - return impl().paint.template get().get(klass); +DataDrivenPropertyValue LineLayer::getLineOffset() const { + return impl().paint.template get().value; } -void LineLayer::setLineOffset(DataDrivenPropertyValue value, const optional& klass) { - if (value == getLineOffset(klass)) +void LineLayer::setLineOffset(DataDrivenPropertyValue value) { + if (value == getLineOffset()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); @@ -354,29 +354,29 @@ void LineLayer::setLineOffset(DataDrivenPropertyValue value, const option } } -void LineLayer::setLineOffsetTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineOffsetTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineOffsetTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineOffsetTransition() const { + return impl().paint.template get().options; } DataDrivenPropertyValue LineLayer::getDefaultLineBlur() { return { 0 }; } -DataDrivenPropertyValue LineLayer::getLineBlur(const optional& klass) const { - return impl().paint.template get().get(klass); +DataDrivenPropertyValue LineLayer::getLineBlur() const { + return impl().paint.template get().value; } -void LineLayer::setLineBlur(DataDrivenPropertyValue value, const optional& klass) { - if (value == getLineBlur(klass)) +void LineLayer::setLineBlur(DataDrivenPropertyValue value) { + if (value == getLineBlur()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); if (value.isDataDriven()) { observer->onLayerDataDrivenPaintPropertyChanged(*this); @@ -385,68 +385,68 @@ void LineLayer::setLineBlur(DataDrivenPropertyValue value, const optional } } -void LineLayer::setLineBlurTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineBlurTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineBlurTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineBlurTransition() const { + return impl().paint.template get().options; } PropertyValue> LineLayer::getDefaultLineDasharray() { return { { } }; } -PropertyValue> LineLayer::getLineDasharray(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue> LineLayer::getLineDasharray() const { + return impl().paint.template get().value; } -void LineLayer::setLineDasharray(PropertyValue> value, const optional& klass) { - if (value == getLineDasharray(klass)) +void LineLayer::setLineDasharray(PropertyValue> value) { + if (value == getLineDasharray()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void LineLayer::setLineDasharrayTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLineDasharrayTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLineDasharrayTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLineDasharrayTransition() const { + return impl().paint.template get().options; } PropertyValue LineLayer::getDefaultLinePattern() { return { "" }; } -PropertyValue LineLayer::getLinePattern(const optional& klass) const { - return impl().paint.template get().get(klass); +PropertyValue LineLayer::getLinePattern() const { + return impl().paint.template get().value; } -void LineLayer::setLinePattern(PropertyValue value, const optional& klass) { - if (value == getLinePattern(klass)) +void LineLayer::setLinePattern(PropertyValue value) { + if (value == getLinePattern()) return; auto impl_ = mutableImpl(); - impl_->paint.template get().set(value, klass); + impl_->paint.template get().value = value; baseImpl = std::move(impl_); observer->onLayerPaintPropertyChanged(*this); } -void LineLayer::setLinePatternTransition(const TransitionOptions& value, const optional& klass) { +void LineLayer::setLinePatternTransition(const TransitionOptions& options) { auto impl_ = mutableImpl(); - impl_->paint.template get().setTransition(value, klass); + impl_->paint.template get().options = options; baseImpl = std::move(impl_); } -TransitionOptions LineLayer::getLinePatternTransition(const optional& klass) const { - return impl().paint.template get().getTransition(klass); +TransitionOptions LineLayer::getLinePatternTransition() const { + return impl().paint.template get().options; } } // namespace style -- cgit v1.2.1