32 |
#include <map> |
#include <map> |
33 |
#include <iostream> |
#include <iostream> |
34 |
|
|
35 |
|
#ifdef HAVE_CONFIG_H |
36 |
|
# include <config.h> |
37 |
|
#endif |
38 |
|
|
39 |
#if POSIX |
#if POSIX |
40 |
# include <sys/types.h> |
# include <sys/types.h> |
41 |
# include <sys/stat.h> |
# include <sys/stat.h> |
99 |
Chunk(FILE* hFile, unsigned long StartPos, bool EndianNative, List* Parent); |
Chunk(FILE* hFile, unsigned long StartPos, bool EndianNative, List* Parent); |
100 |
#endif // POSIX |
#endif // POSIX |
101 |
String GetChunkIDString(); |
String GetChunkIDString(); |
102 |
uint32_t GetChunkID() { return ChunkID; }; |
uint32_t GetChunkID() { return ChunkID; }; ///< Chunk ID in unsigned integer representation. |
103 |
List* GetParent() { return pParent; }; |
List* GetParent() { return pParent; }; ///< Returns pointer to the chunk's parent list chunk. |
104 |
unsigned long GetSize() { return ChunkSize; }; ///< Chunk size in bytes (without header, thus the chunk data body) |
unsigned long GetSize() { return ChunkSize; }; ///< Chunk size in bytes (without header, thus the chunk data body) |
105 |
unsigned long GetPos() { return ulPos; }; ///< Position within the chunk data body |
unsigned long GetPos() { return ulPos; }; ///< Position within the chunk data body |
106 |
unsigned long GetFilePos() { return ulStartPos + ulPos; }; ///< Current, actual offset in file. |
unsigned long GetFilePos() { return ulStartPos + ulPos; }; ///< Current, actual offset in file. |
107 |
unsigned long SetPos(unsigned long Where, stream_whence_t Whence = stream_start); |
unsigned long SetPos(unsigned long Where, stream_whence_t Whence = stream_start); |
108 |
unsigned long RemainingBytes(); |
unsigned long RemainingBytes(); |
182 |
List(FILE* hFile, unsigned long StartPos, bool EndianNative, List* Parent); |
List(FILE* hFile, unsigned long StartPos, bool EndianNative, List* Parent); |
183 |
#endif // POSIX |
#endif // POSIX |
184 |
String GetListTypeString(); |
String GetListTypeString(); |
185 |
uint32_t GetListType() { return ListType; } |
uint32_t GetListType() { return ListType; } ///< Returns unsigned integer representation of the list's ID |
186 |
Chunk* GetSubChunk(uint32_t ChunkID); /* use this if you expect only one subchunk of that type in the list */ |
Chunk* GetSubChunk(uint32_t ChunkID); |
187 |
List* GetSubList(uint32_t ListType); /* use this if you expect only one sublist chunk of that type in the list */ |
List* GetSubList(uint32_t ListType); |
188 |
Chunk* GetFirstSubChunk(); |
Chunk* GetFirstSubChunk(); |
189 |
Chunk* GetNextSubChunk(); |
Chunk* GetNextSubChunk(); |
190 |
List* GetFirstSubList(); |
List* GetFirstSubList(); |