mirror of
https://github.com/nickshanks/ResKnife.git
synced 2025-01-18 10:30:35 +00:00
37 lines
1.2 KiB
Objective-C
37 lines
1.2 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@class Element, ElementOCNT;
|
|
@interface TemplateStream : NSObject
|
|
{
|
|
char *data;
|
|
unsigned int bytesToGo;
|
|
NSMutableArray *counterStack;
|
|
NSMutableArray *keyStack;
|
|
}
|
|
|
|
+ (id)streamWithBytes:(char *)d length:(unsigned int)l;
|
|
+ (id)substreamWithStream:(TemplateStream *)s length:(unsigned int)l;
|
|
|
|
- (id)initStreamWithBytes:(char *)d length:(unsigned int)l;
|
|
- (id)initWithStream:(TemplateStream *)s length:(unsigned int)l;
|
|
|
|
- (char *)data;
|
|
- (unsigned int)bytesToGo;
|
|
- (void)setBytesToGo:(unsigned int)b;
|
|
- (ElementOCNT *)counter;
|
|
- (void)pushCounter:(ElementOCNT *)c;
|
|
- (void)popCounter;
|
|
- (Element *)key;
|
|
- (void)pushKey:(Element *)k;
|
|
- (void)popKey;
|
|
|
|
- (Element *)readOneElement; // For parsing of 'TMPL' resource as template.
|
|
- (unsigned int)bytesToNull;
|
|
- (void)advanceAmount:(unsigned int)l pad:(BOOL)pad; // advance r/w pointer and optionally write padding bytes
|
|
- (void)peekAmount:(unsigned int)l toBuffer:(void *)buffer; // read bytes without advancing pointer
|
|
- (void)readAmount:(unsigned int)l toBuffer:(void *)buffer; // stream reading
|
|
- (void)writeAmount:(unsigned int)l fromBuffer:(const void *)buffer; // stream writing
|
|
- (NSMutableDictionary *)fieldRegistry;
|
|
|
|
@end
|