Ini file that supports both loading and saving. More...
#include <ini_type.h>
Public Member Functions | |
| IniFile (const char *const *list_group_names=NULL) | |
| Create a new ini file with given group names. | |
| bool | SaveToDisk (const char *filename) |
| Save the Ini file's data to the disk. | |
| virtual FILE * | OpenFile (const char *filename, Subdirectory subdir, size_t *size) |
| Open the INI file. | |
| virtual void | ReportFileError (const char *const pre, const char *const buffer, const char *const post) |
| Report an error about the file contents. | |
Ini file that supports both loading and saving.
Definition at line 88 of file ini_type.h.
| IniFile::IniFile | ( | const char *const * | list_group_names = NULL |
) |
| FILE * IniFile::OpenFile | ( | const char * | filename, | |
| Subdirectory | subdir, | |||
| size_t * | size | |||
| ) | [virtual] |
Open the INI file.
| filename | Name of the INI file. | |
| subdir | The subdir to load the file from. | |
| size | [out] Size of the opened file. |
NULL. Implements IniLoadFile.
Definition at line 115 of file ini.cpp.
References FioFOpenFile().
| void IniFile::ReportFileError | ( | const char *const | pre, | |
| const char *const | buffer, | |||
| const char *const | post | |||
| ) | [virtual] |
Report an error about the file contents.
| pre | Prefix text of the buffer part. | |
| buffer | Part of the file with the error. | |
| post | Suffix text of the buffer part. |
Implements IniLoadFile.
Definition at line 122 of file ini.cpp.
References ShowInfoF().
| bool IniFile::SaveToDisk | ( | const char * | filename | ) |
Save the Ini file's data to the disk.
| filename | the file to save to. |
Definition at line 42 of file ini.cpp.
References IniLoadFile::comment, IniGroup::comment, IniLoadFile::group, IniGroup::item, lastof, MemSetT(), IniGroup::name, IniItem::next, IniGroup::next, strecat(), and strecpy().
Referenced by DeleteGRFPresetFromConfig(), SaveGRFPresetToConfig(), and SaveToConfig().
1.7.1