Manages game config files.
More...
#include <public/IGameConfigs.h>
Manages game config files.
virtual void SourceMod::IGameConfigManager::AddUserConfigHook |
( |
const char * |
sectionname, |
|
|
ITextListener_SMC * |
listener |
|
) |
| |
|
pure virtual |
Adds a custom gamedata section hook.
- Parameters
-
sectionname | Section name to hook. |
listener | Listener callback. |
virtual void SourceMod::IGameConfigManager::CloseGameConfigFile |
( |
IGameConfig * |
cfg | ) |
|
|
pure virtual |
Closes an IGameConfig pointer. Since a file can be loaded more than once, the file will not actually be removed from memory until it is closed once for each call to LoadGameConfigfile().
- Parameters
-
virtual bool SourceMod::IGameConfigManager::LoadGameConfigFile |
( |
const char * |
file, |
|
|
IGameConfig ** |
pConfig, |
|
|
char * |
error, |
|
|
size_t |
maxlength |
|
) |
| |
|
pure virtual |
Loads or finds an already loaded game config file.
- Parameters
-
file | File to load. The path must be relative to the 'gamedata' folder and the extension should be omitted. |
pConfig | Pointer to store the game config pointer. Pointer will be valid even on failure. |
error | Optional error message buffer. |
maxlength | Maximum length of the error buffer. |
- Returns
- True on success, false if the file failed.
virtual IGameConfig* SourceMod::IGameConfigManager::ReadHandle |
( |
Handle_t |
hndl, |
|
|
IdentityToken_t * |
ident, |
|
|
HandleError * |
err |
|
) |
| |
|
pure virtual |
Reads an GameConfig Handle.
- Parameters
-
hndl | Handle to read. |
ident | Identity of the owner (can be NULL). |
err | Optional error buffer. |
- Returns
- IGameConfig pointer on success, NULL otherwise.
virtual void SourceMod::IGameConfigManager::RemoveUserConfigHook |
( |
const char * |
sectionname, |
|
|
ITextListener_SMC * |
listener |
|
) |
| |
|
pure virtual |
Removes a custom gamedata section hook.
- Parameters
-
sectionname | Section name to unhook. |
listener | Listener callback. |
The documentation for this class was generated from the following file: