#include <ConfigFile.h>
Inheritance diagram for NSConfigFile::TConfigFileSection:
Public Member Functions | |
TConfigFileSection (const TString §ionName) | |
Constructor. | |
~TConfigFileSection (void) | |
Destructor. | |
BOOL | WriteToFile (TFile &file) |
Writes this section into file. | |
void | Add (const TString &name, const TString &value) |
Adds new pair (name,value) to this section. | |
void | Add (TConfigFileItem *item) |
Adds new pair (name,value) to this section. | |
const TString * | GetValue (const TString &name) const |
Return value for specified item. | |
const char * | GetValueAlt (const TString &name, const char *alternative) const |
Return value for specified item. | |
const char * | GetValueFromSetOrAlt (const TString &name, const char **opts, const DWORD &optsCount, const char *alternative) const |
This method return value for specified property but also check if spcified value is in set of possible values. | |
DWORD | GetValueFromSetOrAlt (const TString &name, const char **opts, const DWORD &optsCount, const DWORD &alternative) const |
This method return value for specified property but also check if specified value is in set of possible values. | |
void | Remove (const TString &name) |
Remove specified item from section. | |
BOOL | ExistsItem (const TString &name) const |
Determines whether specified item exists in this section. | |
BOOL | GetValueINT (const TString &name, int &value) const |
Method converts value from specified item in this section to integer and store it in second parameter. | |
BOOL | GetValueDWORD (const TString &name, DWORD &value) const |
Method converts value from specified item in this section to DWORD and store it in second parameter. | |
BOOL | GetValueBOOL (const TString &name, BOOL &value) const |
Method converts value from specified item in this section to BOOL and store it in second parameter. | |
const TString & | GetSectionName (void) const |
Return name of this section. | |
DWORD | GetSize (void) const |
Returns number of items in this section. | |
const TString & | GetName (const DWORD &index) const |
Returns name of item on specified index. | |
const TString & | GetValue (const DWORD &index) const |
Returns value of item on specified index. |
Section begin with [SECTION_NAME] and continue until next section or end of file.
Each item in section is in format "name_of_item" = "value_of_item" (quotation marks are required!!!).
Definition at line 76 of file ConfigFile.h.
|
Constructor.
Definition at line 117 of file ConfigFile.h. |
|
Destructor.
Definition at line 124 of file ConfigFile.h. |
|
Adds new pair (name,value) to this section.
Definition at line 64 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::AddItem(). Here is the call graph for this function: ![]() |
|
Adds new pair (name,value) to this section.
Definition at line 54 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::AddItem(). Here is the call graph for this function: ![]() |
|
Determines whether specified item exists in this section.
Definition at line 222 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::GetSize(), and TRUE. Here is the call graph for this function: ![]() |
|
Returns name of item on specified index. Index must be valid!!!
Definition at line 146 of file ConfigFile.h. Referenced by NSMeshes::TDeclarationManager::Initialize(). |
|
Return name of this section.
Definition at line 130 of file ConfigFile.h. |
|
Returns number of items in this section.
Definition at line 137 of file ConfigFile.h. References TArrayPtrs< T, size, step >::GetSize(). Referenced by NSMeshes::TDeclarationManager::Initialize(). Here is the call graph for this function: ![]() |
|
Returns value of item on specified index. Index must be valid!!!
Definition at line 155 of file ConfigFile.h. |
|
Return value for specified item. Item is determined by its name. If given name doesnt exists then NULL is returned.
Definition at line 74 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::GetSize(). Referenced by GetValueBOOL(), GetValueDWORD(), GetValueINT(), and NSMeshes::TDeclarationManager::Initialize(). Here is the call graph for this function: ![]() |
|
Return value for specified item. Item is determined by its name. If given name doesnt exists then alternative is returned. This method can be useful for explicit specifiyng result for missing values in configuration file.
Definition at line 100 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::GetSize(). Referenced by NSConfigFile::TConfigFile::GetValueDirect(). Here is the call graph for this function: ![]() |
|
Method converts value from specified item in this section to BOOL and store it in second parameter.
Definition at line 311 of file ConfigFile.cpp. References FALSE, GetValue(), TString::ToInt(), and TRUE. Here is the call graph for this function: ![]() |
|
Method converts value from specified item in this section to DWORD and store it in second parameter.
Definition at line 274 of file ConfigFile.cpp. References FALSE, GetValue(), TString::ToInt(), and TRUE. Here is the call graph for this function: ![]() |
|
This method return value for specified property but also check if specified value is in set of possible values. If not then alternative is returned. This method returns number which specified zero-based index of alternative in array.
Definition at line 169 of file ConfigFile.cpp. References DBGASSERT, and TArrayPtrs< T, size, step >::GetSize(). Here is the call graph for this function: ![]() |
|
This method return value for specified property but also check if spcified value is in set of possible values. If not then alternative is returned.
Definition at line 127 of file ConfigFile.cpp. References DBGASSERT, and TArrayPtrs< T, size, step >::GetSize(). Referenced by NSConfigFile::TConfigFile::GetValueFromSetOrAlt(). Here is the call graph for this function: ![]() |
|
Method converts value from specified item in this section to integer and store it in second parameter.
Definition at line 248 of file ConfigFile.cpp. References FALSE, GetValue(), TString::ToInt(), and TRUE. Here is the call graph for this function: ![]() |
|
Remove specified item from section.
Definition at line 203 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::GetSize(), and TArrayPtrs< T, size, step >::RemoveItemFast(). Here is the call graph for this function: ![]() |
|
Writes this section into file.
After last item in section must followed '
Definition at line 24 of file ConfigFile.cpp. References TArrayPtrs< T, size, step >::Count(), FALSE, TFile::PutChar(), and TFile::Write(). Here is the call graph for this function: ![]() |