-
Notifications
You must be signed in to change notification settings - Fork 0
/
KMLElement.m
44 lines (34 loc) · 842 Bytes
/
KMLElement.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// KMLElement.m
// KMLViewer
//
// Created by Mojtaba Cazi on 2/27/18.
//
#import "KMLElement.h"
// Begin the implementations of KMLElement and subclasses. These objects
// act as state machines during parsing time and then once the document is
// fully parsed they act as an object graph for describing the placemarks and
// styles that have been parsed.
@implementation KMLElement
@synthesize identifier;
- (instancetype)initWithIdentifier:(NSString *)ident {
if (self = [super init]) {
identifier = ident;
}
return self;
}
- (BOOL)canAddString {
return NO;
}
- (void)addString:(NSString *)str {
if ([self canAddString]) {
if (!accum) {
accum = [[NSMutableString alloc] init];
}
[accum appendString:str];
}
}
- (void)clearString {
accum = nil;
}
@end