|
OpenTTD Source
1.10.0-RC1
|
Derived class for loading INI files without going through Fio stuff. More...
Public Member Functions | |
| SettingsIniFile (const char *const *list_group_names=nullptr, const char *const *seq_group_names=nullptr) | |
| Construct a new ini loader. More... | |
| virtual FILE * | OpenFile (const char *filename, Subdirectory subdir, size_t *size) |
| Open the INI file. More... | |
| virtual void | ReportFileError (const char *const pre, const char *const buffer, const char *const post) |
| Report an error about the file contents. More... | |
Public Member Functions inherited from IniLoadFile | |
| IniLoadFile (const char *const *list_group_names=nullptr, const char *const *seq_group_names=nullptr) | |
| Construct a new in-memory Ini file representation. More... | |
| virtual | ~IniLoadFile () |
| Free everything we loaded. More... | |
| IniGroup * | GetGroup (const char *name, size_t len=0, bool create_new=true) |
| Get the group with the given name. More... | |
| void | RemoveGroup (const char *name) |
| Remove the group with the given name. More... | |
| void | LoadFromDisk (const char *filename, Subdirectory subdir) |
| Load the Ini file's data from the disk. More... | |
Additional Inherited Members | |
Data Fields inherited from IniLoadFile | |
| IniGroup * | group |
| the first group in the ini | |
| IniGroup ** | last_group |
| the last group in the ini | |
| char * | comment |
| last comment in file | |
| const char *const * | list_group_names |
| nullptr terminated list with group names that are lists | |
| const char *const * | seq_group_names |
| nullptr terminated list with group names that are sequences. | |
Derived class for loading INI files without going through Fio stuff.
Definition at line 158 of file settingsgen.cpp.
|
inline |
Construct a new ini loader.
| list_group_names | A nullptr terminated list with group names that should be loaded as lists instead of variables. |
| seq_group_names | A nullptr terminated list with group names that should be loaded as lists of names. |
Definition at line 164 of file settingsgen.cpp.
|
inlinevirtual |
Open the INI file.
| filename | Name of the INI file. | |
| subdir | The subdir to load the file from. | |
| [out] | size | Size of the opened file. |
nullptr. Implements IniLoadFile.
Definition at line 169 of file settingsgen.cpp.
|
inlinevirtual |
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 183 of file settingsgen.cpp.
References error().