OLD | NEW |
(Empty) | |
| 1 // -*- mode: ObjC -*- |
| 2 |
| 3 // This file is part of class-dump, a utility for examining the Objective-C seg
ment of Mach-O files. |
| 4 // Copyright (C) 1997-1998, 2000-2001, 2004-2010 Steve Nygard. |
| 5 |
| 6 #import <Foundation/Foundation.h> |
| 7 |
| 8 enum { |
| 9 CDByteOrderLittleEndian = 0, |
| 10 CDByteOrderBigEndian = 1, |
| 11 }; |
| 12 typedef NSUInteger CDByteOrder; |
| 13 |
| 14 @interface CDDataCursor : NSObject |
| 15 { |
| 16 NSData *data; |
| 17 NSUInteger offset; |
| 18 CDByteOrder byteOrder; |
| 19 } |
| 20 |
| 21 - (id)initWithData:(NSData *)someData; |
| 22 - (void)dealloc; |
| 23 |
| 24 - (NSData *)data; |
| 25 - (const void *)bytes; |
| 26 |
| 27 - (NSUInteger)offset; |
| 28 - (void)setOffset:(NSUInteger)newOffset; |
| 29 - (void)advanceByLength:(NSUInteger)length; |
| 30 - (NSUInteger)remaining; |
| 31 |
| 32 - (uint8_t)readByte; |
| 33 |
| 34 - (uint16_t)readLittleInt16; |
| 35 - (uint32_t)readLittleInt32; |
| 36 - (uint64_t)readLittleInt64; |
| 37 |
| 38 - (uint16_t)readBigInt16; |
| 39 - (uint32_t)readBigInt32; |
| 40 - (uint64_t)readBigInt64; |
| 41 |
| 42 - (float)readLittleFloat32; |
| 43 - (float)readBigFloat32; |
| 44 |
| 45 - (double)readLittleFloat64; |
| 46 //- (double)readBigFloat64; |
| 47 |
| 48 - (void)appendBytesOfLength:(NSUInteger)length intoData:(NSMutableData *)targetD
ata; |
| 49 - (void)readBytesOfLength:(NSUInteger)length intoBuffer:(void *)buf; |
| 50 - (BOOL)isAtEnd; |
| 51 |
| 52 - (CDByteOrder)byteOrder; |
| 53 - (void)setByteOrder:(CDByteOrder)newByteOrder; |
| 54 |
| 55 // Read using the current byteOrder |
| 56 - (uint16_t)readInt16; |
| 57 - (uint32_t)readInt32; |
| 58 - (uint64_t)readInt64; |
| 59 |
| 60 - (uint32_t)peekInt32; |
| 61 |
| 62 - (NSString *)readCString; |
| 63 - (NSString *)readStringOfLength:(NSUInteger)length encoding:(NSStringEncoding)e
ncoding; |
| 64 |
| 65 @end |
OLD | NEW |