Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios, macos] Remove unused MGLGeometryAdditions category stub
Browse files Browse the repository at this point in the history
This fixes an issue where the documentation for all NSValue categories
were described as `MGLGeometryAdditions`.
  • Loading branch information
boundsj committed Nov 23, 2016
1 parent 13e0f9e commit d6d16c1
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 86 deletions.
1 change: 0 additions & 1 deletion platform/darwin/src/MGLBackgroundStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include <mbgl/style/layers/background_layer.hpp>


@interface MGLBackgroundStyleLayer ()

@property (nonatomic) mbgl::style::BackgroundLayer *rawLayer;
Expand Down
11 changes: 2 additions & 9 deletions platform/darwin/src/MGLCircleStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "MGLCircleStyleLayer.h"

#include <mbgl/style/layers/circle_layer.hpp>

namespace mbgl {

MBGL_DEFINE_ENUM(MGLCircleTranslateAnchor, {
Expand Down Expand Up @@ -141,10 +140,7 @@ - (void)setCircleTranslate:(MGLStyleValue<NSValue *> *)circleTranslate {
}

- (void)setCircleTranslateAnchor:(MGLStyleValue<NSValue *> *)circleTranslateAnchor {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType,
NSValue *,
mbgl::style::TranslateAnchorType,
MGLCircleTranslateAnchor>().toEnumPropertyValue(circleTranslateAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLCircleTranslateAnchor>().toEnumPropertyValue(circleTranslateAnchor);
_rawLayer->setCircleTranslateAnchor(mbglValue);
}

Expand All @@ -154,10 +150,7 @@ - (void)setCircleTranslateAnchor:(MGLStyleValue<NSValue *> *)circleTranslateAnch
}

- (void)setCirclePitchScale:(MGLStyleValue<NSValue *> *)circlePitchScale {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType,
NSValue *,
mbgl::style::CirclePitchScaleType,
MGLCirclePitchScale>().toEnumPropertyValue(circlePitchScale);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::CirclePitchScaleType, NSValue *, mbgl::style::CirclePitchScaleType, MGLCirclePitchScale>().toEnumPropertyValue(circlePitchScale);
_rawLayer->setCirclePitchScale(mbglValue);
}

Expand Down
6 changes: 1 addition & 5 deletions platform/darwin/src/MGLFillStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "MGLFillStyleLayer.h"

#include <mbgl/style/layers/fill_layer.hpp>

namespace mbgl {

MBGL_DEFINE_ENUM(MGLFillTranslateAnchor, {
Expand Down Expand Up @@ -136,10 +135,7 @@ - (void)setFillTranslate:(MGLStyleValue<NSValue *> *)fillTranslate {
}

- (void)setFillTranslateAnchor:(MGLStyleValue<NSValue *> *)fillTranslateAnchor {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType,
NSValue *,
mbgl::style::TranslateAnchorType,
MGLFillTranslateAnchor>().toEnumPropertyValue(fillTranslateAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLFillTranslateAnchor>().toEnumPropertyValue(fillTranslateAnchor);
_rawLayer->setFillTranslateAnchor(mbglValue);
}

Expand Down
7 changes: 0 additions & 7 deletions platform/darwin/src/MGLGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,4 @@ NS_INLINE CLLocationDegrees MGLDegreesFromRadians(CGFloat radians) {
return radians * 180 / M_PI;
}

/**
Methods for round-tripping Mapbox geometry structure values.
*/
@interface NSValue (MGLGeometryAdditions)

@end

NS_ASSUME_NONNULL_END
16 changes: 3 additions & 13 deletions platform/darwin/src/MGLLineStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "MGLLineStyleLayer.h"

#include <mbgl/style/layers/line_layer.hpp>

namespace mbgl {

MBGL_DEFINE_ENUM(MGLLineCap, {
Expand Down Expand Up @@ -98,10 +97,7 @@ - (void)removeFromMapView:(MGLMapView *)mapView
#pragma mark - Accessing the Layout Attributes

- (void)setLineCap:(MGLStyleValue<NSValue *> *)lineCap {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::LineCapType,
NSValue *,
mbgl::style::LineCapType,
MGLLineCap>().toEnumPropertyValue(lineCap);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::LineCapType, NSValue *, mbgl::style::LineCapType, MGLLineCap>().toEnumPropertyValue(lineCap);
_rawLayer->setLineCap(mbglValue);
}

Expand All @@ -111,10 +107,7 @@ - (void)setLineCap:(MGLStyleValue<NSValue *> *)lineCap {
}

- (void)setLineJoin:(MGLStyleValue<NSValue *> *)lineJoin {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::LineJoinType,
NSValue *,
mbgl::style::LineJoinType,
MGLLineJoin>().toEnumPropertyValue(lineJoin);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::LineJoinType, NSValue *, mbgl::style::LineJoinType, MGLLineJoin>().toEnumPropertyValue(lineJoin);
_rawLayer->setLineJoin(mbglValue);
}

Expand Down Expand Up @@ -176,10 +169,7 @@ - (void)setLineTranslate:(MGLStyleValue<NSValue *> *)lineTranslate {
}

- (void)setLineTranslateAnchor:(MGLStyleValue<NSValue *> *)lineTranslateAnchor {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType,
NSValue *,
mbgl::style::TranslateAnchorType,
MGLLineTranslateAnchor>().toEnumPropertyValue(lineTranslateAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLLineTranslateAnchor>().toEnumPropertyValue(lineTranslateAnchor);
_rawLayer->setLineTranslateAnchor(mbglValue);
}

Expand Down
1 change: 0 additions & 1 deletion platform/darwin/src/MGLRasterStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include <mbgl/style/layers/raster_layer.hpp>


@interface MGLRasterStyleLayer ()

@property (nonatomic) mbgl::style::RasterLayer *rawLayer;
Expand Down
11 changes: 2 additions & 9 deletions platform/darwin/src/MGLStyleLayer.mm.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#import "MGL<%- camelize(type) %>StyleLayer.h"

#include <mbgl/style/layers/<%- type %>_layer.hpp>

<% if (containsEnumerationProperties) { -%>
namespace mbgl {
Expand Down Expand Up @@ -131,10 +130,7 @@ namespace mbgl {
<% for (const property of layoutProperties) { -%>
- (void)set<%- camelize(property.name) %>:(MGLStyleValue<<%- propertyType(property, true) %>> *)<%- objCName(property) %> {
<% if (property.type == "enum") { -%>
auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>,
NSValue *,
mbgl::style::<%- mbglType(property) %>,
MGL<%- camelize(property.name) %>>().toEnumPropertyValue(<%- objCName(property) %>);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(property.name) %>>().toEnumPropertyValue(<%- objCName(property) %>);
_rawLayer->set<%- camelize(property.name) %>(mbglValue);
<% } else { -%>
auto mbglValue = MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toPropertyValue(<%- objCName(property) %>);
Expand All @@ -159,10 +155,7 @@ namespace mbgl {
<% for (const property of paintProperties) { -%>
- (void)set<%- camelize(property.name) %>:(MGLStyleValue<<%- propertyType(property, true) %>> *)<%- objCName(property) %> {
<% if (property.type == "enum") { -%>
auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>,
NSValue *,
mbgl::style::<%- mbglType(property) %>,
MGL<%- camelize(property.name) %>>().toEnumPropertyValue(<%- objCName(property) %>);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::<%- mbglType(property) %>, NSValue *, mbgl::style::<%- mbglType(property) %>, MGL<%- camelize(property.name) %>>().toEnumPropertyValue(<%- objCName(property) %>);
_rawLayer->set<%- camelize(property.name) %>(mbglValue);
<% } else { -%>
auto mbglValue = MGLStyleValueTransformer<<%- valueTransformerArguments(property).join(', ') %>>().toPropertyValue(<%- objCName(property) %>);
Expand Down
51 changes: 10 additions & 41 deletions platform/darwin/src/MGLSymbolStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "MGLSymbolStyleLayer.h"

#include <mbgl/style/layers/symbol_layer.hpp>

namespace mbgl {

MBGL_DEFINE_ENUM(MGLSymbolPlacement, {
Expand Down Expand Up @@ -145,10 +144,7 @@ - (void)removeFromMapView:(MGLMapView *)mapView
#pragma mark - Accessing the Layout Attributes

- (void)setSymbolPlacement:(MGLStyleValue<NSValue *> *)symbolPlacement {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::SymbolPlacementType,
NSValue *,
mbgl::style::SymbolPlacementType,
MGLSymbolPlacement>().toEnumPropertyValue(symbolPlacement);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::SymbolPlacementType, NSValue *, mbgl::style::SymbolPlacementType, MGLSymbolPlacement>().toEnumPropertyValue(symbolPlacement);
_rawLayer->setSymbolPlacement(mbglValue);
}

Expand Down Expand Up @@ -208,10 +204,7 @@ - (void)setIconOptional:(MGLStyleValue<NSNumber *> *)iconOptional {
}

- (void)setIconRotationAlignment:(MGLStyleValue<NSValue *> *)iconRotationAlignment {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType,
NSValue *,
mbgl::style::AlignmentType,
MGLIconRotationAlignment>().toEnumPropertyValue(iconRotationAlignment);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLIconRotationAlignment>().toEnumPropertyValue(iconRotationAlignment);
_rawLayer->setIconRotationAlignment(mbglValue);
}

Expand All @@ -231,10 +224,7 @@ - (void)setIconSize:(MGLStyleValue<NSNumber *> *)iconSize {
}

- (void)setIconTextFit:(MGLStyleValue<NSValue *> *)iconTextFit {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::IconTextFitType,
NSValue *,
mbgl::style::IconTextFitType,
MGLIconTextFit>().toEnumPropertyValue(iconTextFit);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::IconTextFitType, NSValue *, mbgl::style::IconTextFitType, MGLIconTextFit>().toEnumPropertyValue(iconTextFit);
_rawLayer->setIconTextFit(mbglValue);
}

Expand Down Expand Up @@ -304,10 +294,7 @@ - (void)setIconOffset:(MGLStyleValue<NSValue *> *)iconOffset {
}

- (void)setTextPitchAlignment:(MGLStyleValue<NSValue *> *)textPitchAlignment {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType,
NSValue *,
mbgl::style::AlignmentType,
MGLTextPitchAlignment>().toEnumPropertyValue(textPitchAlignment);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextPitchAlignment>().toEnumPropertyValue(textPitchAlignment);
_rawLayer->setTextPitchAlignment(mbglValue);
}

Expand All @@ -317,10 +304,7 @@ - (void)setTextPitchAlignment:(MGLStyleValue<NSValue *> *)textPitchAlignment {
}

- (void)setTextRotationAlignment:(MGLStyleValue<NSValue *> *)textRotationAlignment {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType,
NSValue *,
mbgl::style::AlignmentType,
MGLTextRotationAlignment>().toEnumPropertyValue(textRotationAlignment);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextRotationAlignment>().toEnumPropertyValue(textRotationAlignment);
_rawLayer->setTextRotationAlignment(mbglValue);
}

Expand Down Expand Up @@ -390,10 +374,7 @@ - (void)setTextLetterSpacing:(MGLStyleValue<NSNumber *> *)textLetterSpacing {
}

- (void)setTextJustify:(MGLStyleValue<NSValue *> *)textJustify {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextJustifyType,
NSValue *,
mbgl::style::TextJustifyType,
MGLTextJustify>().toEnumPropertyValue(textJustify);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustify>().toEnumPropertyValue(textJustify);
_rawLayer->setTextJustify(mbglValue);
}

Expand All @@ -403,10 +384,7 @@ - (void)setTextJustify:(MGLStyleValue<NSValue *> *)textJustify {
}

- (void)setTextAnchor:(MGLStyleValue<NSValue *> *)textAnchor {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextAnchorType,
NSValue *,
mbgl::style::TextAnchorType,
MGLTextAnchor>().toEnumPropertyValue(textAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextAnchorType, NSValue *, mbgl::style::TextAnchorType, MGLTextAnchor>().toEnumPropertyValue(textAnchor);
_rawLayer->setTextAnchor(mbglValue);
}

Expand Down Expand Up @@ -456,10 +434,7 @@ - (void)setTextKeepUpright:(MGLStyleValue<NSNumber *> *)textKeepUpright {
}

- (void)setTextTransform:(MGLStyleValue<NSValue *> *)textTransform {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextTransformType,
NSValue *,
mbgl::style::TextTransformType,
MGLTextTransform>().toEnumPropertyValue(textTransform);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextTransformType, NSValue *, mbgl::style::TextTransformType, MGLTextTransform>().toEnumPropertyValue(textTransform);
_rawLayer->setTextTransform(mbglValue);
}

Expand Down Expand Up @@ -571,10 +546,7 @@ - (void)setIconTranslate:(MGLStyleValue<NSValue *> *)iconTranslate {
}

- (void)setIconTranslateAnchor:(MGLStyleValue<NSValue *> *)iconTranslateAnchor {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType,
NSValue *,
mbgl::style::TranslateAnchorType,
MGLIconTranslateAnchor>().toEnumPropertyValue(iconTranslateAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLIconTranslateAnchor>().toEnumPropertyValue(iconTranslateAnchor);
_rawLayer->setIconTranslateAnchor(mbglValue);
}

Expand Down Expand Up @@ -644,10 +616,7 @@ - (void)setTextTranslate:(MGLStyleValue<NSValue *> *)textTranslate {
}

- (void)setTextTranslateAnchor:(MGLStyleValue<NSValue *> *)textTranslateAnchor {
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType,
NSValue *,
mbgl::style::TranslateAnchorType,
MGLTextTranslateAnchor>().toEnumPropertyValue(textTranslateAnchor);
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLTextTranslateAnchor>().toEnumPropertyValue(textTranslateAnchor);
_rawLayer->setTextTranslateAnchor(mbglValue);
}

Expand Down

0 comments on commit d6d16c1

Please sign in to comment.