00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #import "OFObject.h"
00018
00019 @class OFString;
00020
00027 @interface OFDataArray: OFObject <OFCopying, OFComparing>
00028 {
00029 char *data;
00030 size_t count;
00031 size_t itemSize;
00032 }
00033
00034 #ifdef OF_HAVE_PROPERTIES
00035 @property (readonly) size_t count;
00036 @property (readonly) size_t itemSize;
00037 #endif
00038
00045 + dataArrayWithItemSize: (size_t)is;
00046
00054 + dataArrayWithContentsOfFile: (OFString*)path;
00055
00063 + dataArrayWithBase64EncodedString: (OFString*)str;
00064
00072 - initWithItemSize: (size_t)is;
00073
00081 - initWithContentsOfFile: (OFString*)path;
00082
00090 - initWithBase64EncodedString: (OFString*)str;
00091
00095 - (size_t)count;
00096
00100 - (size_t)itemSize;
00101
00105 - (void*)cArray;
00106
00113 - (void*)itemAtIndex: (size_t)index;
00114
00118 - (void*)firstItem;
00119
00123 - (void*)lastItem;
00124
00130 - (void)addItem: (const void*)item;
00131
00138 - (void)addItem: (const void*)item
00139 atIndex: (size_t)index;
00140
00147 - (void)addNItems: (size_t)nitems
00148 fromCArray: (const void*)carray;
00149
00157 - (void)addNItems: (size_t)nitems
00158 fromCArray: (const void*)carray
00159 atIndex: (size_t)index;
00160
00166 - (void)removeItemAtIndex: (size_t)index;
00167
00173 - (void)removeNItems: (size_t)nitems;
00174
00181 - (void)removeNItems: (size_t)nitems
00182 atIndex: (size_t)index;
00183
00187 - (OFString*)stringByBase64Encoding;
00188 @end
00189
00197 @interface OFBigDataArray: OFDataArray
00198 {
00199 size_t size;
00200 }
00201 @end
00202
00203 #import "OFDataArray+Hashing.h"