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

#include <DBCFileLoader.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 (DBCFileLoader &file_, unsigned char *offset_)
 

Private Attributes

unsigned char * offset
 
DBCFileLoaderfile
 

Friends

class DBCFileLoader
 

Constructor & Destructor Documentation

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

Member Function Documentation

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const char* DBCFileLoader::Record::getString ( size_t  field) const
inline
64  {
65  assert(field < file.fieldCount);
66  size_t stringOffset = getUInt(field);
67  assert(stringOffset < file.stringSize);
68  return reinterpret_cast<char*>(file.stringTable + stringOffset);
69  }
uint32 fieldCount
Definition: DBCFileLoader.h:96
DBCFileLoader & file
Definition: DBCFileLoader.h:74
uint32 stringSize
Definition: DBCFileLoader.h:97
unsigned char * stringTable
Definition: DBCFileLoader.h:100
uint32 getUInt(size_t field) const
Definition: DBCFileLoader.h:44

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8 DBCFileLoader::Record::getUInt8 ( size_t  field) const
inline
52  {
53  assert(field < file.fieldCount);
54  return *reinterpret_cast<uint8*>(offset + file.GetOffset(field));
55  }
uint32 fieldCount
Definition: DBCFileLoader.h:96
DBCFileLoader & file
Definition: DBCFileLoader.h:74
unsigned char * offset
Definition: DBCFileLoader.h:73
uint32 GetOffset(size_t id) const
Definition: DBCFileLoader.h:87
uint8_t uint8
Definition: Define.h:152

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class DBCFileLoader
friend

Member Data Documentation

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

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