WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
DB2Table Class Reference

Provides typed, field-name-based access to records in a WDC DB2 file. More...

#include <DB2Table.h>

Classes

class  Iterator
 

Public Member Functions

 DB2Table (std::unique_ptr< DB2Reader > reader, std::vector< DB2FieldInfo > fields)
 
 ~DB2Table ()
 
 DB2Table (const DB2Table &)=delete
 
DB2Tableoperator= (const DB2Table &)=delete
 
DB2Row getRow (uint32_t id) const
 
DB2Row getRowByIndex (size_t index) const
 
size_t getRowCount () const
 
Iterator begin () const
 
Iterator end () const
 
const DB2FieldInfofindField (const std::string &name) const
 

Private Member Functions

const DB2FieldInforesolveField (const std::string &name, unsigned int &arrayIndex) const
 
uint32_t readUInt (size_t recordIndex, const DB2FieldInfo &field, unsigned int arrayIndex) const
 
std::string readString (size_t recordIndex, const DB2FieldInfo &field, unsigned int arrayIndex) const
 
uint32_t getRecordID (size_t recordIndex) const
 

Private Attributes

std::unique_ptr< DB2Readerm_reader
 
std::vector< DB2FieldInfom_fields
 
std::unordered_map< std::string, size_t > m_fieldNameToIndex
 

Friends

class DB2Row
 

Detailed Description

Provides typed, field-name-based access to records in a WDC DB2 file.

Definition at line 49 of file DB2Table.h.

Constructor & Destructor Documentation

◆ DB2Table() [1/2]

DB2Table::DB2Table ( std::unique_ptr< DB2Reader reader,
std::vector< DB2FieldInfo fields 
)

Definition at line 88 of file DB2Table.cpp.

Here is the call graph for this function:

◆ ~DB2Table()

DB2Table::~DB2Table ( )
default

◆ DB2Table() [2/2]

DB2Table::DB2Table ( const DB2Table )
delete

Member Function Documentation

◆ begin()

Iterator DB2Table::begin ( ) const
inline

Definition at line 78 of file DB2Table.h.

Here is the caller graph for this function:

◆ end()

Iterator DB2Table::end ( ) const
inline

Definition at line 79 of file DB2Table.h.

Here is the call graph for this function:

◆ findField()

const DB2FieldInfo * DB2Table::findField ( const std::string &  name) const

Definition at line 117 of file DB2Table.cpp.

Here is the call graph for this function:

◆ getRecordID()

uint32_t DB2Table::getRecordID ( size_t  recordIndex) const
private

Definition at line 158 of file DB2Table.cpp.

Here is the caller graph for this function:

◆ getRow()

DB2Row DB2Table::getRow ( uint32_t  id) const

Definition at line 97 of file DB2Table.cpp.

Here is the caller graph for this function:

◆ getRowByIndex()

DB2Row DB2Table::getRowByIndex ( size_t  index) const

Definition at line 105 of file DB2Table.cpp.

◆ getRowCount()

size_t DB2Table::getRowCount ( ) const

Definition at line 112 of file DB2Table.cpp.

Here is the caller graph for this function:

◆ operator=()

DB2Table & DB2Table::operator= ( const DB2Table )
delete

◆ readString()

std::string DB2Table::readString ( size_t  recordIndex,
const DB2FieldInfo field,
unsigned int  arrayIndex 
) const
private

Definition at line 184 of file DB2Table.cpp.

Here is the caller graph for this function:

◆ readUInt()

uint32_t DB2Table::readUInt ( size_t  recordIndex,
const DB2FieldInfo field,
unsigned int  arrayIndex 
) const
private

Definition at line 163 of file DB2Table.cpp.

Here is the caller graph for this function:

◆ resolveField()

const DB2FieldInfo * DB2Table::resolveField ( const std::string &  name,
unsigned int &  arrayIndex 
) const
private

Definition at line 125 of file DB2Table.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ DB2Row

friend class DB2Row
friend

Definition at line 85 of file DB2Table.h.

Member Data Documentation

◆ m_fieldNameToIndex

std::unordered_map<std::string, size_t> DB2Table::m_fieldNameToIndex
private

Definition at line 102 of file DB2Table.h.

◆ m_fields

std::vector<DB2FieldInfo> DB2Table::m_fields
private

Definition at line 101 of file DB2Table.h.

◆ m_reader

std::unique_ptr<DB2Reader> DB2Table::m_reader
private

Definition at line 100 of file DB2Table.h.


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