[ios, macos] Added debug descriptions for runtime styling classes

This commit is contained in:
Minh Nguyễn
2016-08-18 18:01:19 -07:00
committed by Minh Nguyễn
parent 67e079f726
commit 767044420d
8 changed files with 54 additions and 0 deletions

View File

@@ -10,4 +10,11 @@
return self;
}
- (NSString *)description {
return [NSString stringWithFormat:
@"<%@: %p; identifier = %@; sourceIdentifier = %@; visible = %@>",
NSStringFromClass([self class]), (void *)self, self.identifier,
self.sourceIdentifier, self.visible ? @"YES" : @"NO"];
}
@end

View File

@@ -192,4 +192,10 @@ const MGLGeoJSONSourceOption MGLGeoJSONSourceOptionSimplificationTolerance = @"M
_features = MGLFeaturesFromMBGLFeatures(featureCollection);
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@; URL = %@; geoJSONData = %@; features = %@>",
NSStringFromClass([self class]), (void *)self, self.identifier, self.URL, self.geoJSONData, self.features];
}
@end

View File

@@ -73,4 +73,12 @@
self.rawSource = _pendingSource.get();
}
- (NSString *)description
{
return [NSString stringWithFormat:
@"<%@: %p; identifier = %@; URL = %@; tileSet = %@; tileSize = %lu>",
NSStringFromClass([self class]), (void *)self, self.identifier, self.URL,
self.tileSet, (unsigned long)self.tileSize];
}
@end

View File

@@ -12,4 +12,9 @@
return self;
}
- (NSString *)description {
return [NSString stringWithFormat:@"<%@: %p; identifier = %@>",
NSStringFromClass([self class]), (void *)self, self.identifier];
}
@end

View File

@@ -51,4 +51,11 @@
return self.rawLayer->getMinZoom();
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@; visible = %@>",
NSStringFromClass([self class]), (void *)self, self.identifier,
self.visible ? @"YES" : @"NO"];
}
@end

View File

@@ -84,4 +84,10 @@
return tileset;
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; tileURLTemplates = %@>",
NSStringFromClass([self class]), (void *)self, self.tileURLTemplates];
}
@end

View File

@@ -72,4 +72,10 @@ static NSString *MGLVectorSourceType = @"vector";
self.rawSource = _pendingSource.get();
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; identifier = %@; URL = %@; tileSet = %@>",
NSStringFromClass([self class]), (void *)self, self.identifier, self.URL, self.tileSet];
}
@end

View File

@@ -13,4 +13,13 @@
return nil;
}
- (NSString *)description {
return [NSString stringWithFormat:
@"<%@: %p; identifier = %@; sourceIdentifier = %@; "
@"sourceLayerIdentifier = %@; predicate = %@; visible = %@>",
NSStringFromClass([self class]), (void *)self, self.identifier,
self.sourceIdentifier, self.sourceLayerIdentifier, self.predicate,
self.visible ? @"YES" : @"NO"];
}
@end