#include <ConfigFile.h>
Inheritance diagram for NSConfigFile::TConfigFile:
Public Member Functions | |
TConfigFile (void) | |
Default constructor. | |
BOOL | LoadConfigFile (const TString &filename) |
Parse specified config file with given syntax. | |
BOOL | SaveConfigFile (const TString &filename) |
Save actual configuration into file with specified name. | |
BOOL | LoadConfigFileFromVFS (const TString &filename) |
Parse specified config file with given syntax loaded from VFS. | |
DWORD | GetSectionCount (void) const |
Return number of sections in loaded file. | |
const TConfigFileSection * | GetSection (const TString &name) const |
Return section determined by its name. | |
const TConfigFileSection * | GetSection (const DWORD &index) const |
Return section determined by its index. | |
const char * | GetValueDirect (const TString §ionName, const TString &name, const char *alternative) const |
This method provides quick way to get value from specified section. | |
const char * | GetValueFromSetOrAlt (const TString §ionName, const TString &name, const char **opts, const DWORD &optsCount, const char *alternative) const |
This method provides quick way to get value from specified section. | |
DWORD | GetValueFromSetOrAlt (const TString §ionName, const TString &name, const char **opts, const DWORD &optsCount, const DWORD &alternative) const |
This method provides quick way to get value from specified section. |
[SECTION 1] "name" = "value" ;comment to end of line or EOF if this is last line in file "name" = "value" "name" = "value" ;comment [SECTION 2] "name" = "value" "name" = "value" "name" = "value" . . .
Definition at line 185 of file ConfigFile.h.
|
Default constructor.
Definition at line 228 of file ConfigFile.h. |
|
Return section determined by its index. Index must be valid!!!.
Definition at line 580 of file ConfigFile.cpp. |
|
Return section determined by its name. If section with given name doesnt exists NULL is returned.
Definition at line 562 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::GetSize(). Referenced by GetValueDirect(), GetValueFromSetOrAlt(), and NSMeshes::TDeclarationManager::Initialize(). Here is the call graph for this function: ![]() |
|
Return number of sections in loaded file.
Definition at line 234 of file ConfigFile.h. References TArrayPtrs< T, size, step >::GetSize(). Here is the call graph for this function: ![]() |
|
This method provides quick way to get value from specified section. You provide name of section and property name and method returns value. If property or section are not found then ALTERNATIVE is returned.
Definition at line 594 of file ConfigFile.cpp. References GetSection(), and NSConfigFile::TConfigFileSection::GetValueAlt(). Here is the call graph for this function: ![]() |
|
This method provides quick way to get value from specified section. You provide name of section and property name and method returns value. Returned value is zero-based index of given option stored in array (or ALTERNATIVE) If property or section are not found then ALTERNATIVE is returned. Method also check if found value belongs to specified set of possible options. If not then alternative is returned.
Definition at line 628 of file ConfigFile.cpp. References GetSection(), and NSConfigFile::TConfigFileSection::GetValueFromSetOrAlt(). Here is the call graph for this function: ![]() |
|
This method provides quick way to get value from specified section. You provide name of section and property name and method returns value. If property or section are not found then ALTERNATIVE is returned. Method also check if found value belongs to specified set of possible options. If not then alternative is returned. Array of options must be terminated by NULL!!!
Definition at line 663 of file ConfigFile.cpp. References GetSection(), and NSConfigFile::TConfigFileSection::GetValueFromSetOrAlt(). Here is the call graph for this function: ![]() |
|
Parse specified config file with given syntax.
Definition at line 335 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::ClearDeallocOff(), DBGNL, DBGTEXT, DBGTEXTF, FALSE, TString::GetString(), and TFile::Open(). Referenced by TGlobalsSystem::Initialize(). Here is the call graph for this function: ![]() |
|
Parse specified config file with given syntax loaded from VFS.
Definition at line 690 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::ClearDeallocOff(), DBGNL, DBGTEXT, DBGTEXTF, FALSE, NSFileSystem::TFSFileSystem::GetFile(), TGlobalsSystem::GetFileSystem(), TString::GetString(), and NSFileSystem::TVirtualFileAutoPtr< T >::IsNULL(). Here is the call graph for this function: ![]() |
|
Save actual configuration into file with specified name.
Definition at line 384 of file ConfigFile.cpp. References FALSE, and TFile::Open(). Here is the call graph for this function: ![]() |