18 #ifndef DB2_FILE_LOADER_H
19 #define DB2_FILE_LOADER_H
33 bool Load(
const char *filename,
const char *
fmt);
40 assert(field < file.fieldCount);
41 float val = *
reinterpret_cast<float*
>(offset + file.GetOffset(field));
47 assert(field < file.fieldCount);
48 uint32 val = *
reinterpret_cast<uint32*
>(offset + file.GetOffset(field));
54 assert(field < file.fieldCount);
55 return *
reinterpret_cast<uint8*
>(offset + file.GetOffset(field));
59 assert(field < file.fieldCount);
60 uint64 val = *
reinterpret_cast<uint64*
>(offset + file.GetOffset(field));
66 assert(field < file.fieldCount);
67 size_t stringOffset = getUInt(field);
68 assert(stringOffset < file.stringSize);
69 return reinterpret_cast<char*
>(file.stringTable + stringOffset);
124 static char* AddString(
char const** holder, std::string
const&
value);
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
uint64 getUInt64(size_t field) const
Definition: DB2StorageLoader.h:57
HotfixDatabaseStatements
Definition: HotfixDatabase.h:24
uint32 build
Definition: DB2StorageLoader.h:108
Record getRecord(size_t id)
Definition: DB2StorageLoader.cpp:201
int unk1
Definition: DB2StorageLoader.h:110
unsigned char * offset
Definition: DB2StorageLoader.h:74
uint32 GetHash() const
Definition: DB2StorageLoader.h:87
void EndianConvert(T &val)
Definition: ByteConverter.h:48
uint32 recordCount
Definition: DB2StorageLoader.h:99
static uint32 GetFormatStringFieldCount(const char *format)
Definition: DB2StorageLoader.cpp:245
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 stringSize
Definition: DB2StorageLoader.h:101
int minIndex
Definition: DB2StorageLoader.h:111
char * AutoProduceStringsArrayHolders(const char *fmt, char *dataTable)
Definition: DB2StorageLoader.cpp:343
const char * getString(size_t field) const
Definition: DB2StorageLoader.h:64
DB2FileLoader & file
Definition: DB2StorageLoader.h:75
bool IsLoaded() const
Definition: DB2StorageLoader.h:88
uint32 getUInt(size_t field) const
Definition: DB2StorageLoader.h:45
uint32 GetNumRows() const
Get begin iterator over records.
Definition: DB2StorageLoader.h:84
int maxIndex
Definition: DB2StorageLoader.h:112
static uint32 GetFormatLocalizedStringFieldCount(const char *format)
Definition: DB2StorageLoader.cpp:255
unsigned char * stringTable
Definition: DB2StorageLoader.h:104
char * AutoProduceData(const char *fmt, uint32 &count, char **&indexTable)
Definition: DB2StorageLoader.cpp:265
uint32 recordSize
Definition: DB2StorageLoader.h:98
char const * fileName
Definition: DB2StorageLoader.h:96
Definition: DB2StorageLoader.h:27
uint32 GetCols() const
Definition: DB2StorageLoader.h:85
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint8 getUInt8(size_t field) const
Definition: DB2StorageLoader.h:52
uint64_t uint64
Definition: Define.h:149
#define TC_SHARED_API
Definition: Define.h:128
float getFloat(size_t field) const
Definition: DB2StorageLoader.h:38
int localeMask
Definition: DB2StorageLoader.h:113
uint32 * fieldsOffset
Definition: DB2StorageLoader.h:102
uint32 GetOffset(size_t id) const
Definition: DB2StorageLoader.h:86
Definition: DB2StorageLoader.h:117
std::string _storageName
Definition: DB2StorageLoader.h:127
char * AutoProduceStrings(const char *fmt, char *dataTable, uint32 locale)
Definition: DB2StorageLoader.cpp:412
uint8_t uint8
Definition: Define.h:152
const FieldDescriptor value
Definition: descriptor.h:1522
static uint32 GetFormatRecordSize(const char *format, int32 *index_pos=NULL)
Definition: DB2StorageLoader.cpp:207
uint32 fieldCount
Definition: DB2StorageLoader.h:100
Definition: DB2StorageLoader.h:35
DB2DatabaseLoader(std::string const &storageName)
Definition: DB2StorageLoader.h:120
Record(DB2FileLoader &file_, unsigned char *offset_)
Definition: DB2StorageLoader.h:73
unsigned char * data
Definition: DB2StorageLoader.h:103
int unk5
Definition: DB2StorageLoader.h:114
uint32 tableHash
Definition: DB2StorageLoader.h:107