Public Member Functions

SourceMod::IGameConfigManager Class Reference

Manages game config files. More...

#include <public/IGameConfigs.h>

Inherits SourceMod::SMInterface.

Collaboration diagram for SourceMod::IGameConfigManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
virtual bool LoadGameConfigFile (const char *file, IGameConfig **pConfig, char *error, size_t maxlength)=0
 Loads or finds an already loaded game config file.
virtual void CloseGameConfigFile (IGameConfig *cfg)=0
 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().
virtual IGameConfigReadHandle (Handle_t hndl, IdentityToken_t *ident, HandleError *err)=0
 Reads an GameConfig Handle.
virtual void AddUserConfigHook (const char *sectionname, ITextListener_SMC *listener)=0
 Adds a custom gamedata section hook.
virtual void RemoveUserConfigHook (const char *sectionname, ITextListener_SMC *listener)=0
 Removes a custom gamedata section hook.
virtual void AcquireLock ()=0
 Does nothing.
virtual void ReleaseLock ()=0
 Does nothing.

Detailed Description

Manages game config files.

Definition at line 106 of file IGameConfigs.h.


Member Function Documentation

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 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:
cfg Pointer to the IGameConfig to close.
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::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::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: