#include <GlobalsSystem.h>
Inheritance diagram for TGlobalsSystem:
Static Public Member Functions | |
static BOOL | Initialize (void) |
This method initialize static items in TGlobalsSystem with default objects. | |
static void | Destroy (void) |
This method destroy all static objects stored inside this class. | |
static void | SetFileSystem (TFSFileSystem *filesystem) |
Set VFS. | |
static const TFSFileSystem * | GetFileSystem (void) |
Returns actual VFS. | |
static void | SetConfiguration (TConfigFile *configFile) |
Set configuration file. | |
static const TConfigFile * | GetConfiguration (void) |
Returns actual configuration file. | |
static void | SetLogFile (TLogFile *logFile) |
Set file for logging. | |
static const TLogFile * | GetLogFile (void) |
Returns actual logfile. |
You must set this objects at begin of program. All objects MUST be dynamically allocated because they are destroyed at end of program via method Destroy() - this method must be called manually.
It's recommended to initialize this static class with method Initialize() which initialize all items to default (first load file 'system.ini' and from it initialize other items)
All GET method must always return non-NULL pointers!!!
Definition at line 33 of file GlobalsSystem.h.
|
This method destroy all static objects stored inside this class.
Definition at line 107 of file GlobalsSystem.cpp. References TMemManager::GetAlign(), TMemManager::GetAllocation(), TMemManager::GetMem(), TLogFile::Write(), TLogFile::WriteINT(), and TLogFile::WriteNewLine(). Referenced by Initialize(), and WinMain(). Here is the call graph for this function: ![]() |
|
Returns actual configuration file. You cannot change this pointer, pointer is destroyed via Destroy method. Definition at line 85 of file GlobalsSystem.h. Referenced by NSMeshes::TDeclarationManager::Initialize(). |
|
Returns actual VFS. You cannot change this pointer, pointer is destroyed via Destroy method. Definition at line 68 of file GlobalsSystem.h. Referenced by NSConfigFile::TConfigFile::LoadConfigFileFromVFS(), NSMeshes::TDeclarationLoader::LoadDeclarationFromFile(), NSMeshes::TMeshLoader::LoadMeshDataFromFile(), and NSMeshes::TMeshLoader::LoadMeshFromFile(). |
|
Returns actual logfile. You cannot change this pointer, pointer is destroyed via Destroy method. Definition at line 102 of file GlobalsSystem.h. Referenced by NSMeshes::TDeclarationManager::CreateDeclarationManager(), NSShaders::TPixelShaderManager::CreatePixelShaderManager(), TTextureManager::CreateTextureManager(), NSShaders::TVertexShaderManager::CreateVertexShaderManager(), TGlobalsMath::Destroy(), TGlobalsGraphic::Destroy(), NSMeshes::TDeclarationManager::DestroyDeclarationManager(), NSShaders::TPixelShaderManager::DestroyPixelShaderManager(), NSMeshes::TMeshManager::DestroyRendererResources(), TTextureManager::DestroyTextureManager(), NSShaders::TVertexShaderManager::DestroyVertexShaderManager(), TGlobalsMath::Initialize(), TGlobalsGraphic::Initialize(), NSMeshes::TDeclarationManager::Initialize(), NSMeshes::TMeshManager::LoadRendererResources(), and WinMain(). |
|
This method initialize static items in TGlobalsSystem with default objects. Previous objects are automatically destroyed. It first load configuration file 'system.ini' - section '[system]' and from it read information about next objects. If there is problem (e.g. missing 'system.ini' or section '[system]') then FALSE is returned and application should be closed. Definition at line 29 of file GlobalsSystem.cpp. References DBGTEXTF, Destroy(), FALSE, and NSConfigFile::TConfigFile::LoadConfigFile(). Referenced by WinMain(). Here is the call graph for this function: ![]() |
|
Set configuration file. Previous instance is lost, thus you should call this method only once.
Definition at line 76 of file GlobalsSystem.h. References DBGASSERT. |
|
Set VFS. Previous instance is lost, thus you should call this method only once.
Definition at line 59 of file GlobalsSystem.h. References DBGASSERT. |
|
Set file for logging. Previous instance is lost, thus you should call this method only once.
Definition at line 93 of file GlobalsSystem.h. References DBGASSERT. |