TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DB2FileLoader::Record Class Reference

#include <DB2StorageLoader.h>

Public Member Functions

float getFloat (size_t field) const
 
uint32 getUInt (size_t field) const
 
uint8 getUInt8 (size_t field) const
 
uint64 getUInt64 (size_t field) const
 
const char * getString (size_t field) const
 

Private Member Functions

 Record (DB2FileLoader &file_, unsigned char *offset_)
 

Private Attributes

unsigned char * offset
 
DB2FileLoaderfile
 

Friends

class DB2FileLoader
 

Constructor & Destructor Documentation

DB2FileLoader::Record::Record ( DB2FileLoader file_,
unsigned char *  offset_ 
)
inlineprivate
73 : offset(offset_), file(file_) {}
unsigned char * offset
Definition: DB2StorageLoader.h:74
DB2FileLoader & file
Definition: DB2StorageLoader.h:75

Member Function Documentation

float DB2FileLoader::Record::getFloat ( size_t  field) const
inline
39  {
40  assert(field < file.fieldCount);
41  float val = *reinterpret_cast<float*>(offset + file.GetOffset(field));
42  EndianConvert(val);
43  return val;
44  }
unsigned char * offset
Definition: DB2StorageLoader.h:74
void EndianConvert(T &val)
Definition: ByteConverter.h:48
DB2FileLoader & file
Definition: DB2StorageLoader.h:75
uint32 GetOffset(size_t id) const
Definition: DB2StorageLoader.h:86
uint32 fieldCount
Definition: DB2StorageLoader.h:100

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const char* DB2FileLoader::Record::getString ( size_t  field) const
inline
65  {
66  assert(field < file.fieldCount);
67  size_t stringOffset = getUInt(field);
68  assert(stringOffset < file.stringSize);
69  return reinterpret_cast<char*>(file.stringTable + stringOffset);
70  }
uint32 stringSize
Definition: DB2StorageLoader.h:101
DB2FileLoader & file
Definition: DB2StorageLoader.h:75
uint32 getUInt(size_t field) const
Definition: DB2StorageLoader.h:45
unsigned char * stringTable
Definition: DB2StorageLoader.h:104
uint32 fieldCount
Definition: DB2StorageLoader.h:100

+ Here is the caller graph for this function:

uint32 DB2FileLoader::Record::getUInt ( size_t  field) const
inline
46  {
47  assert(field < file.fieldCount);
48  uint32 val = *reinterpret_cast<uint32*>(offset + file.GetOffset(field));
49  EndianConvert(val);
50  return val;
51  }
unsigned char * offset
Definition: DB2StorageLoader.h:74
void EndianConvert(T &val)
Definition: ByteConverter.h:48
DB2FileLoader & file
Definition: DB2StorageLoader.h:75
uint32_t uint32
Definition: Define.h:150
uint32 GetOffset(size_t id) const
Definition: DB2StorageLoader.h:86
uint32 fieldCount
Definition: DB2StorageLoader.h:100

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint64 DB2FileLoader::Record::getUInt64 ( size_t  field) const
inline
58  {
59  assert(field < file.fieldCount);
60  uint64 val = *reinterpret_cast<uint64*>(offset + file.GetOffset(field));
61  EndianConvert(val);
62  return val;
63  }
unsigned char * offset
Definition: DB2StorageLoader.h:74
void EndianConvert(T &val)
Definition: ByteConverter.h:48
DB2FileLoader & file
Definition: DB2StorageLoader.h:75
uint64_t uint64
Definition: Define.h:149
uint32 GetOffset(size_t id) const
Definition: DB2StorageLoader.h:86
uint32 fieldCount
Definition: DB2StorageLoader.h:100

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8 DB2FileLoader::Record::getUInt8 ( size_t  field) const
inline
53  {
54  assert(field < file.fieldCount);
55  return *reinterpret_cast<uint8*>(offset + file.GetOffset(field));
56  }
unsigned char * offset
Definition: DB2StorageLoader.h:74
DB2FileLoader & file
Definition: DB2StorageLoader.h:75
uint32 GetOffset(size_t id) const
Definition: DB2StorageLoader.h:86
uint8_t uint8
Definition: Define.h:152
uint32 fieldCount
Definition: DB2StorageLoader.h:100

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class DB2FileLoader
friend

Member Data Documentation

DB2FileLoader& DB2FileLoader::Record::file
private
unsigned char* DB2FileLoader::Record::offset
private

The documentation for this class was generated from the following file: