-
Notifications
You must be signed in to change notification settings - Fork 17
/
MPWDelimitedTable.h
48 lines (38 loc) · 1.17 KB
/
MPWDelimitedTable.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
46
47
//
// MPWDelimitedTable.h
// MPWFoundation
//
// Created by Marcel Weiher on 9/22/13.
//
//
#import <Foundation/Foundation.h>
@class MPWIntArray,MPWObjectCache;
@protocol MPWPlistStreaming;
@interface MPWDelimitedTable : NSObject
{
NSData *data;
const char *bytes;
NSArray *headerKeys;
NSString *fieldDelimiter;
MPWIntArray *lineOffsets;
int eolLength;
char fieldDelimiterBytes[20];
int fieldDelimiterLength;
MPWObjectCache *subdatas;
NSArray *keysOfInterest;
MPWIntArray *indexesOfInterest;
}
-initWithData:(NSData*)newTableData delimiter:(NSString*)newFieldDelimiter;
-initWithTabSeparatedData:(NSData*)newTableData;
-initWithCommaSeparatedData:(NSData*)newTableData;
-(NSUInteger)count;
-(NSArray*)headerKeys;
-(NSDictionary*)dictionaryAtIndex:(int)anIndex;
-(void)do:(void(^)(NSDictionary* theDict, int anIndex))block;
-(NSArray*)collect:(id(^)(id theDict))block;
-(NSArray*)parcollect:(id(^)(id theDict))block;
-(void)pardo:(void(^)(NSDictionary* theDict, int anIndex))block;
-(void)setKeysOfInterest:(NSArray*)keys;
-(NSDictionary*)slowDictionaryAtIndex:(int)anIndex;
-(void)writeOnBuilder:(id <MPWPlistStreaming>)builder;
@end