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

Singleton entry point for the game data layer. More...

#include <Game.h>

Public Member Functions

void init (std::unique_ptr< core::GameFolder > folder, std::unique_ptr< core::GameDatabase > db)
 Initialise with the given folder and database backends.
 
bool initDone ()
 True once both the folder and database have been set.
 
void addCustomFiles (const std::string &path, bool bypassOriginalFiles)
 Overlay custom loose files on top of the game archive.
 
core::GameFolderfolder ()
 
core::GameDatabasedatabase ()
 
void setConfigFolder (const std::string &folder)
 
std::string configFolder ()
 
 Game (const Game &)=delete
 
Gameoperator= (const Game &)=delete
 

Static Public Member Functions

static Gameinstance ()
 Access the singleton instance (Meyers singleton).
 

Private Member Functions

 Game ()
 
 ~Game ()
 

Private Attributes

std::unique_ptr< core::GameFolderm_folder
 
std::unique_ptr< core::GameDatabasem_db
 
std::string m_configFolder
 

Detailed Description

Singleton entry point for the game data layer.

Owns the GameFolder (archive access) and GameDatabase (DB2 tables). Access via the GAMEDIRECTORY and GAMEDATABASE macros.

Definition at line 18 of file Game.h.

Constructor & Destructor Documentation

◆ Game() [1/2]

core::Game::Game ( const Game )
delete

◆ Game() [2/2]

core::Game::Game ( )
privatedefault

◆ ~Game()

core::Game::~Game ( )
privatedefault

Member Function Documentation

◆ addCustomFiles()

void core::Game::addCustomFiles ( const std::string &  path,
bool  bypassOriginalFiles 
)

Overlay custom loose files on top of the game archive.

Definition at line 15 of file Game.cpp.

◆ configFolder()

std::string core::Game::configFolder ( )
inline

Definition at line 41 of file Game.h.

Here is the caller graph for this function:

◆ database()

core::GameDatabase & core::Game::database ( )
inline

Definition at line 38 of file Game.h.

◆ folder()

core::GameFolder & core::Game::folder ( )
inline

Definition at line 37 of file Game.h.

Here is the caller graph for this function:

◆ init()

void core::Game::init ( std::unique_ptr< core::GameFolder folder,
std::unique_ptr< core::GameDatabase db 
)

Initialise with the given folder and database backends.

Definition at line 7 of file Game.cpp.

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

◆ initDone()

bool core::Game::initDone ( )
inline

True once both the folder and database have been set.

Definition at line 32 of file Game.h.

◆ instance()

static Game & core::Game::instance ( )
inlinestatic

Access the singleton instance (Meyers singleton).

Definition at line 22 of file Game.h.

Here is the caller graph for this function:

◆ operator=()

Game & core::Game::operator= ( const Game )
delete

◆ setConfigFolder()

void core::Game::setConfigFolder ( const std::string &  folder)
inline

Definition at line 40 of file Game.h.

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

Member Data Documentation

◆ m_configFolder

std::string core::Game::m_configFolder
private

Definition at line 53 of file Game.h.

◆ m_db

std::unique_ptr<core::GameDatabase> core::Game::m_db
private

Definition at line 51 of file Game.h.

◆ m_folder

std::unique_ptr<core::GameFolder> core::Game::m_folder
private

Definition at line 50 of file Game.h.


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