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

WoW-specific database that lazy-loads DB2 tables from the CASC archive. More...

#include <WoWDatabase.h>

Inheritance diagram for wow::WoWDatabase:
[legend]
Collaboration diagram for wow::WoWDatabase:
[legend]

Public Member Functions

 WoWDatabase ()
 
 ~WoWDatabase () override
 
const DB2TablegetTable (const std::string &name)
 
core::TableStructurecreateTableStructure ()
 
core::FieldStructurecreateFieldStructure ()
 
void readSpecificTableAttributesFromDBD (const core::DBDVersionDef &, core::TableStructure *) override
 
void readSpecificFieldAttributesFromDBD (const core::DBDVersionField &, const core::DBDColumnDef &, core::FieldStructure *) override
 
void setFieldPos (core::FieldStructure *, int pos) override
 
std::string getLayoutHashForTable (const std::string &tableName) override
 
- Public Member Functions inherited from core::GameDatabase
 GameDatabase ()
 
bool initFromDBD (const std::string &dbdDir, const std::string &buildVersion)
 
bool initFromDBD (const std::string &dbdDir, const std::string &buildVersion, const std::vector< std::string > &tableNames)
 
void setFastMode ()
 
void setCachePath (const std::string &path)
 
void setDbdBaseUrl (const std::string &url)
 
void setManifestUrl (const std::string &url)
 
bool downloadAndParseManifest ()
 
int getFileDataIdForTable (const std::string &tableName) const
 
virtual ~GameDatabase ()
 

Private Member Functions

std::unique_ptr< DB2TablebuildDB2Table (const std::string &tableName)
 

Private Attributes

std::unordered_map< std::string, std::unique_ptr< DB2Table > > m_tables
 

Additional Inherited Members

- Protected Member Functions inherited from core::GameDatabase
core::TableStructurebuildTableStructure (const std::string &tableName)
 

Detailed Description

WoW-specific database that lazy-loads DB2 tables from the CASC archive.

Definition at line 37 of file WoWDatabase.h.

Constructor & Destructor Documentation

◆ WoWDatabase()

wow::WoWDatabase::WoWDatabase ( )

Definition at line 13 of file WoWDatabase.cpp.

◆ ~WoWDatabase()

wow::WoWDatabase::~WoWDatabase ( )
overridedefault

Member Function Documentation

◆ buildDB2Table()

std::unique_ptr< DB2Table > wow::WoWDatabase::buildDB2Table ( const std::string &  tableName)
private

Definition at line 31 of file WoWDatabase.cpp.

Here is the call graph for this function:

◆ createFieldStructure()

core::FieldStructure * wow::WoWDatabase::createFieldStructure ( )
virtual

Implements core::GameDatabase.

Definition at line 103 of file WoWDatabase.cpp.

◆ createTableStructure()

core::TableStructure * wow::WoWDatabase::createTableStructure ( )
virtual

Implements core::GameDatabase.

Definition at line 98 of file WoWDatabase.cpp.

◆ getLayoutHashForTable()

std::string wow::WoWDatabase::getLayoutHashForTable ( const std::string &  tableName)
overridevirtual

Reimplemented from core::GameDatabase.

Definition at line 146 of file WoWDatabase.cpp.

Here is the call graph for this function:

◆ getTable()

const DB2Table * wow::WoWDatabase::getTable ( const std::string &  name)

Definition at line 19 of file WoWDatabase.cpp.

◆ readSpecificFieldAttributesFromDBD()

void wow::WoWDatabase::readSpecificFieldAttributesFromDBD ( const core::DBDVersionField vField,
const core::DBDColumnDef colDef,
core::FieldStructure fieldStruct 
)
overridevirtual

Implements core::GameDatabase.

Definition at line 124 of file WoWDatabase.cpp.

◆ readSpecificTableAttributesFromDBD()

void wow::WoWDatabase::readSpecificTableAttributesFromDBD ( const core::DBDVersionDef verDef,
core::TableStructure tblStruct 
)
overridevirtual

Implements core::GameDatabase.

Definition at line 108 of file WoWDatabase.cpp.

◆ setFieldPos()

void wow::WoWDatabase::setFieldPos ( core::FieldStructure fieldStruct,
int  pos 
)
overridevirtual

Implements core::GameDatabase.

Definition at line 139 of file WoWDatabase.cpp.

Member Data Documentation

◆ m_tables

std::unordered_map<std::string, std::unique_ptr<DB2Table> > wow::WoWDatabase::m_tables
private

Definition at line 59 of file WoWDatabase.h.


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