My Project
|
a singleton class for managing all data providers used in the game engine. More...
#include <DataProviderManager.h>
Public Member Functions | |
void | Cleanup () |
cleanup everything. More... | |
CCharacterDB * | GetCharacterDB () |
get the global character model database | |
CKidsDBProvider * | GetKidsDBProvider () |
get the current kids game database | |
CNpcDatabase * | GetNpcDB () |
this function shall never be called from the scripting interface. More... | |
AttributeProvider * | GetAttributeProvider () |
get the current attribute data provider. More... | |
void | SetNpcDB (const string &sConnectionstring) |
set the global NPC data base to a new database file. More... | |
void | SetAttributeProvider (const string &sConnectionstring) |
set the current attribute data base to a new database file. More... | |
void | SetKidsDBProvider (const string &sConnectionstring) |
set the current kids game data base to a new database file. More... | |
void | SetWorldDB (const string &sConnectionstring) |
set world database. More... | |
LocalGameLanguage | GetLocalGameLanguage (void) |
Get local game language. | |
void | SetLocalGameLanguage (const LocalGameLanguage lang) |
Set local game language. | |
Static Public Member Functions | |
static CDataProviderManager & | GetSingleton () |
a singleton class for managing all data providers used in the game engine.
such as, character database, NPC database, world, string, music, etc.
void CDataProviderManager::Cleanup | ( | ) |
cleanup everything.
AttributeProvider * CDataProviderManager::GetAttributeProvider | ( | ) |
get the current attribute data provider.
CNpcDatabase * CDataProviderManager::GetNpcDB | ( | ) |
this function shall never be called from the scripting interface.
this is solely for exporting API. and should not be used from the scripting interface. get the current NPC data provider.
void CDataProviderManager::SetAttributeProvider | ( | const string & | sConnectionstring | ) |
set the current attribute data base to a new database file.
sConnectionstring | : currently it is the file path of the database file. |
void CDataProviderManager::SetKidsDBProvider | ( | const string & | sConnectionstring | ) |
set the current kids game data base to a new database file.
sConnectionstring | : currently it is the file path of the database file. |
void CDataProviderManager::SetNpcDB | ( | const string & | sConnectionstring | ) |
set the global NPC data base to a new database file.
sConnectionstring | : currently it is the file path of the database file. |
|
inline |
set world database.
it sets attribute provider, NPC database, etc to the same database file.
sConnectionstring | : currently it is the file path of the database file. |