-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathINIEntry.h
45 lines (33 loc) · 850 Bytes
/
INIEntry.h
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
45
// © 2010 Mirek Rusin
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
#import <Foundation/Foundation.h>
typedef enum {
INIEntryTypeSection,
INIEntryTypeKeyValue,
INIEntryTypeComment,
INIEntryTypeOther
} INIEntryType;
typedef struct {
NSRange key;
NSRange value;
NSRange section;
} INIEntryInfo;
@interface INIEntry : NSObject {
NSString *line;
INIEntryInfo info;
INIEntryType type;
}
@property (nonatomic, retain) NSString *line;
@property (assign) INIEntryInfo info;
@property (assign) INIEntryType type;
- (id) init;
- (id) initWithLine: (NSString *) line;
+ (INIEntry *) entryWithLine: (NSString *) line;
- (NSString *) key;
- (void) setKey: (NSString *) key;
- (NSString *) value;
- (void) setValue: (NSString *) value;
- (NSString *) section;
- (void) parse;
@end