2 * Copyright 2013, Gerasim Troeglazov, 3dEyes@gmail.com. All rights reserved.
3 * Distributed under the terms of the MIT License.
7 #ifndef PSD_DATA_ARRAY_H
8 #define PSD_DATA_ARRAY_H
17 #include <ByteOrder.h>
19 #define DATAARRAY_BLOCK_SIZE 1024
23 BDataArray(int32 blockSize
= DATAARRAY_BLOCK_SIZE
);
26 BDataArray
& Append(int8 val
);
27 BDataArray
& Append(uint8 val
);
28 BDataArray
& Append(int16 val
);
29 BDataArray
& Append(uint16 val
);
30 BDataArray
& Append(int32 val
);
31 BDataArray
& Append(uint32 val
);
32 BDataArray
& Append(int64 val
);
33 BDataArray
& Append(uint64 val
);
34 BDataArray
& Append(const char *str
);
35 BDataArray
& Append(BString
& str
);
36 BDataArray
& Append(BDataArray
& str
);
37 BDataArray
& Append(uint8
*ptr
, int32 len
);
39 BDataArray
& Repeat(uint8 byte
, int32 count
);
41 BDataArray
& operator<<(int8
);
42 BDataArray
& operator<<(uint8
);
43 BDataArray
& operator<<(int16
);
44 BDataArray
& operator<<(uint16
);
45 BDataArray
& operator<<(int32
);
46 BDataArray
& operator<<(uint32
);
47 BDataArray
& operator<<(int64
);
48 BDataArray
& operator<<(uint64
);
49 BDataArray
& operator<<(const char*);
50 BDataArray
& operator<<(BDataArray
&);
55 ssize_t
WriteToStream(BPositionIO
*stream
);
58 inline status_t
_ReallocArrayFor(int32 size
);
62 int32 fAllocatedDataSize
;
67 #endif /* PSD_DATA_ARRAY_H */