19 #ifndef DBC_FILE_LOADER_H
20 #define DBC_FILE_LOADER_H
32 bool Load(
const char *filename,
const char *
fmt);
39 assert(field < file.fieldCount);
40 float val = *
reinterpret_cast<float*
>(offset + file.GetOffset(field));
46 assert(field < file.fieldCount);
47 uint32 val = *
reinterpret_cast<uint32*
>(offset + file.GetOffset(field));
53 assert(field < file.fieldCount);
54 return *
reinterpret_cast<uint8*
>(offset + file.GetOffset(field));
58 assert(field < file.fieldCount);
59 uint64 val = *
reinterpret_cast<uint64*
>(offset + file.GetOffset(field));
65 assert(field < file.fieldCount);
66 size_t stringOffset = getUInt(field);
67 assert(stringOffset < file.stringSize);
68 return reinterpret_cast<char*
>(file.stringTable + stringOffset);
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
Record getRecord(size_t id)
Definition: DBCFileLoader.cpp:122
uint64 getUInt64(size_t field) const
Definition: DBCFileLoader.h:56
uint32 * fieldsOffset
Definition: DBCFileLoader.h:98
uint32 fieldCount
Definition: DBCFileLoader.h:96
uint32 recordCount
Definition: DBCFileLoader.h:95
DBCFileLoader & file
Definition: DBCFileLoader.h:74
void EndianConvert(T &val)
Definition: ByteConverter.h:48
arena_t NULL
Definition: jemalloc_internal.h:624
unsigned char * data
Definition: DBCFileLoader.h:99
bool IsLoaded() const
Definition: DBCFileLoader.h:88
uint8 getUInt8(size_t field) const
Definition: DBCFileLoader.h:51
Definition: DBCFileLoader.h:26
uint32 recordSize
Definition: DBCFileLoader.h:94
float getFloat(size_t field) const
Definition: DBCFileLoader.h:37
uint32 stringSize
Definition: DBCFileLoader.h:97
uint32 GetRowSize() const
Definition: DBCFileLoader.h:85
char * AutoProduceStrings(const char *fmt, char *dataTable)
Definition: DBCFileLoader.cpp:272
unsigned char * offset
Definition: DBCFileLoader.h:73
uint32 GetNumRows() const
Get begin iterator over records.
Definition: DBCFileLoader.h:84
uint32 GetOffset(size_t id) const
Definition: DBCFileLoader.h:87
DBCFileLoader()
Definition: DBCFileLoader.cpp:26
Vector2int16 & operator=(const Any &a)
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
#define TC_SHARED_API
Definition: Define.h:128
char * AutoProduceData(const char *fmt, uint32 &count, char **&indexTable, uint32 sqlRecordCount, uint32 sqlHighestIndex, char *&sqlDataTable)
Definition: DBCFileLoader.cpp:173
unsigned char * stringTable
Definition: DBCFileLoader.h:100
uint32 GetCols() const
Definition: DBCFileLoader.h:86
static uint32 GetFormatRecordSize(const char *format, int32 *index_pos=NULL)
Definition: DBCFileLoader.cpp:128
const char * getString(size_t field) const
Definition: DBCFileLoader.h:63
uint8_t uint8
Definition: Define.h:152
Record(DBCFileLoader &file_, unsigned char *offset_)
Definition: DBCFileLoader.h:72
uint32 getUInt(size_t field) const
Definition: DBCFileLoader.h:44
Definition: DBCFileLoader.h:34