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

#include <dbcfile.h>

Public Member Functions

float getFloat (size_t field) const
 
unsigned int getUInt (size_t field) const
 
int getInt (size_t field) const
 
char constgetString (size_t field) const
 
float getFloat (size_t field) const
 
unsigned int getUInt (size_t field) const
 
int getInt (size_t field) const
 
char constgetString (size_t field) const
 

Private Member Functions

 Record (DBCFile &file, unsigned char *offset)
 
Recordoperator= (Record const &right)
 
 Record (DBCFile &file, unsigned char *offset)
 
Recordoperator= (Record const &)
 
 Record (Record const &right)
 

Private Attributes

DBCFilefile
 
unsigned char * offset
 

Friends

class DBCFile
 
class DBCFile::Iterator
 

Constructor & Destructor Documentation

DBCFile::Record::Record ( DBCFile file,
unsigned char *  offset 
)
inlineprivate
83 : file(file), offset(offset) {}
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
DBCFile::Record::Record ( DBCFile file,
unsigned char *  offset 
)
inlineprivate
83 : file(file), offset(offset) {}
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
DBCFile::Record::Record ( Record const right)
inlineprivate
91  : file(right.file), offset(right.offset)
92  {
93  }
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84

Member Function Documentation

float DBCFile::Record::getFloat ( size_t  field) const
inline
57  {
58  assert(field < file._fieldCount);
59  return *reinterpret_cast<float*>(offset + field * 4);
60  }
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
size_t _fieldCount
Definition: dbcfile.h:142
float DBCFile::Record::getFloat ( size_t  field) const
inline
57  {
58  assert(field < file._fieldCount);
59  return *reinterpret_cast<float*>(offset + field * 4);
60  }
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
size_t _fieldCount
Definition: dbcfile.h:142
int DBCFile::Record::getInt ( size_t  field) const
inline
69  {
70  assert(field < file._fieldCount);
71  return *reinterpret_cast<int*>(offset + field * 4);
72  }
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
size_t _fieldCount
Definition: dbcfile.h:142
int DBCFile::Record::getInt ( size_t  field) const
inline
69  {
70  assert(field < file._fieldCount);
71  return *reinterpret_cast<int*>(offset + field * 4);
72  }
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
size_t _fieldCount
Definition: dbcfile.h:142
char const* DBCFile::Record::getString ( size_t  field) const
inline
75  {
76  assert(field < file._fieldCount);
77  size_t stringOffset = getUInt(field);
78  assert(stringOffset < file._stringSize);
79  return reinterpret_cast<char*>(file._stringTable + stringOffset);
80  }
unsigned char * _stringTable
Definition: dbcfile.h:145
DBCFile & file
Definition: dbcfile.h:84
size_t _stringSize
Definition: dbcfile.h:143
unsigned int getUInt(size_t field) const
Definition: dbcfile.h:62
size_t _fieldCount
Definition: dbcfile.h:142

+ Here is the call graph for this function:

char const* DBCFile::Record::getString ( size_t  field) const
inline
75  {
76  assert(field < file._fieldCount);
77  size_t stringOffset = getUInt(field);
78  assert(stringOffset < file._stringSize);
79  return reinterpret_cast<char*>(file._stringTable + stringOffset);
80  }
unsigned char * _stringTable
Definition: dbcfile.h:145
DBCFile & file
Definition: dbcfile.h:84
size_t _stringSize
Definition: dbcfile.h:143
unsigned int getUInt(size_t field) const
Definition: dbcfile.h:62
size_t _fieldCount
Definition: dbcfile.h:142

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int DBCFile::Record::getUInt ( size_t  field) const
inline
63  {
64  assert(field < file._fieldCount);
65  return *reinterpret_cast<unsigned int*>(offset + field * 4);
66  }
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
size_t _fieldCount
Definition: dbcfile.h:142
unsigned int DBCFile::Record::getUInt ( size_t  field) const
inline
63  {
64  assert(field < file._fieldCount);
65  return *reinterpret_cast<unsigned int*>(offset + field * 4);
66  }
unsigned char * offset
Definition: dbcfile.h:85
DBCFile & file
Definition: dbcfile.h:84
size_t _fieldCount
Definition: dbcfile.h:142

+ Here is the caller graph for this function:

Record& DBCFile::Record::operator= ( Record const )
private
Record& DBCFile::Record::operator= ( Record const right)
private

Friends And Related Function Documentation

DBCFile
friend

Member Data Documentation

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

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