![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This component gives access to helper routines for configuration files management. The configuration file is buffered in case of multiple calls.
Static Public Member Functions | |
static bool | clearCache () |
static void | flushProfileStrings () |
static void | getDefaultFilename (TSLSimpleString &filename) |
static void | getDefaultSection (TSLSimpleString §ion) |
static bool | lookupProfile (const char *filename, const char *section, const char *keyword, char *value, int valueSize, const char *defValue="", int count=-1) |
static bool | lookupProfile (const char *filename, const char *section, const char *keyword, int *value, const int defValue=0, int count=-1) |
static bool | lookupProfile (const char *filename, const char *section, const char *keyword, double *value, const double defValue=0.0, int count=-1) |
static bool | lookupProfile (const char *filename, const char *section, const char *keyword, TSLULong *value, TSLULong defValue=0, int count=-1) |
static bool | lookupProfile (const char *keyword, char *value, int valueSize, const char *defValue="", int count=-1) |
static bool | lookupProfile (const char *keyword, int *value, const int defValue=0, int count=-1) |
static bool | lookupProfile (const char *keyword, double *value, const double defValue=0.0, int count=-1) |
static bool | lookupProfile (const char *keyword, TSLULong *value, TSLULong defValue=0, int count=-1) |
static void | profileWriteMode (TSLProfileWriteMode writeMode) |
static bool | sectionExists (const char *filename, const char *section) |
static void | setDefaultFilename (const char *filename) |
static void | setDefaultSection (const char *section) |
static bool | writeProfile (const char *filename, const char *section, const char *keyword, int value, int count=-1) |
static bool | writeProfile (const char *filename, const char *section, const char *keyword, const char *value, int count=-1) |
static bool | writeProfile (const char *filename, const char *section, const char *keyword, double value, int count=-1) |
static bool | writeProfile (const char *filename, const char *section, const char *keyword, TSLULong value, int count=-1) |
|
static |
This operation clears the cache of the filename that is currently being read.
|
static |
Writes the profile strings cached to disk. Only useful if the profile write mode is set to TSLProfileWriteWhenFlushed.
|
static |
This method sets the default filename used for lookups.
filename | the default filename or empty if one has not been set. |
|
static |
This method gets the default section to be used for lookups.
section | the default section or empty if one has not been set. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain an associated string value.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
filename | Name of file to read profile from. |
section | Section within the file to read profile from. |
keyword | Name of keyword within file. |
value | Pointer to buffer to store value. |
valueSize | Size of buffer specified by value parameter. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain a double precision associated value.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
filename | Name of file to read profile from. |
section | Section within the file to read profile from. |
keyword | Name of keyword within file. |
value | Pointer to double value to store value. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain an integer associated value.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
filename | Name of file to read profile from. |
section | Section within the file to read profile from. |
keyword | Name of keyword within file. |
value | Pointer to integer value to store value. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain an TSLULong associated value.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
filename | Name of file to read profile from. |
section | Section within the file to read profile from. |
keyword | Name of keyword within file. |
value | Pointer to TSLULong value to store value. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain an associated string value. The default file and section names are used.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
keyword | Name of keyword within file. |
value | Pointer to buffer to store value. |
valueSize | Size of buffer specified by value parameter. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain a double precision associated value. The default file and section names are used.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
keyword | Name of keyword within file. |
value | Pointer to double value to store value. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain an integer associated value. The default file and section names are used.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
keyword | Name of keyword within file. |
value | Pointer to integer value to store value. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation reads the specified keyword from a configuration file, to obtain an TSLULong associated value. The default file and section names are used.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the read occurs.
keyword | Name of keyword within file. |
value | Pointer to TSLULong value to store value. |
defValue | Default value if keyword/count not found |
count | Associated count value, appended to keyword if specified. |
|
static |
Set mode for determining when any profile writes occur.
The default is TSLProfileWriteImmediately.
|
static |
Check if the specified section exists
filename | Path to the config file |
section | Name of the section to check |
|
static |
This method sets the default filename used for lookups.
filename | Default name for initialisation file. |
|
static |
This method sets the default section to be used for lookups.
section | Default name for section within initialisation file. |
|
static |
This operation writes the specified keyword in the configuration file, with an associated value string.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the write occurs.
filename | Name of file to write profile to. |
section | Section within the file to write profile to. |
keyword | Name of keyword within file. |
value | String value to write to keyword. |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation writes the specified keyword in the configuration file, with a floating point associated value.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the write occurs.
filename | Name of file to write profile to. |
section | Section within the file to write profile to. |
keyword | Name of keyword within file. |
value | Double precision value to write to keyword. |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation writes the specified keyword in the configuration file, with an integer associated value.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the write occurs.
filename | Name of file to write profile to. |
section | Section within the file to write profile to. |
keyword | Name of keyword within file. |
value | Integer value to write to keyword. |
count | Associated count value, appended to keyword if specified. |
|
static |
This operation writes the specified keyword in the configuration file, with an TSLLong associated value.
If the count parameter is specified (and is positive), then it is concatenated onto the end of the keyword before the write occurs.
filename | Name of file to write profile to. |
section | Section within the file to write profile to. |
keyword | Name of keyword within file. |
value | TSLULong value to write to keyword. |
count | Associated count value, appended to keyword if specified. |