App::ICheatManager class

This manager is used to control the available cheats in the game, and the cheat console.

It contains a map that assigns a keyword to an ArgScript::ICommand object, which parses the cheat and does the action.

Derived classes

class cCheatManager
The implementation of ICheatManager; this should only be used for extending and detouring.

Public types

enum (anonymous) { kMsgCheatInvoked = 0x4BEF1E3 }

Public static functions

static auto Get() -> ICheatManager*
Returns the active cheat manager.

Constructors, destructors, conversion operators

~ICheatManager() virtual

Public functions

auto AddRef() -> int pure virtual
auto Release() -> int pure virtual
auto Initialize() -> bool pure virtual
auto Dispose() -> bool pure virtual
void func14h() pure virtual
void AddCheat(const char* pString, ArgScript::ICommand* pParser, bool bNotify = false) pure virtual
Adds a cheat to this manager.
void AddCheat(const char* pKeyword, ArgScript::ParseLine_t pParseLine, ArgScript::GetDescription_t pGetDescription, bool bNotify = false)
void RemoveCheat(const char* pString) pure virtual
Removes the cheat that is invoked with the given keyword from this manager.
auto ProcessLine(const char* pString) -> bool pure virtual
Called every time a line is submitted to the console.
auto func24h() -> int pure virtual
auto GetCheat(const char* pKeyword) -> ArgScript::ICommand* pure virtual
Returns the ArgScript::ICommand that is operating behind the requested cheat.
auto GetKeywords(const char* pPattern, vector<const char*> dst) -> size_t pure virtual
Gets all the cheat keywords in this manager that match the given pattern.
void func30h(Object*) pure virtual
void func34h(Object*) pure virtual
auto GetArgScript() -> ArgScript::FormatParser* pure virtual
Returns the ArgScript::FormatParser instance that this manager is using.
void func3Ch(int) pure virtual
void func40h(int) pure virtual
void func44h(int) pure virtual
auto func48h() -> bool pure virtual
void func4Ch(bool) pure virtual

Enum documentation

enum App::ICheatManager::(anonymous)

Enumerators
kMsgCheatInvoked

A message with no content sent when certain cheats are invoked.

Function documentation

void App::ICheatManager::AddCheat(const char* pString, ArgScript::ICommand* pParser, bool bNotify = false) pure virtual

Adds a cheat to this manager.

Parameters
pString The keyword that is used to invoke the cheat. This is case insensitive and it can't contain whitespaces.
pParser The ArgScript::ICommand that represents this cheat.
bNotify [Optional] If true, a kMsgCheatInvoked message will be sent when the cheat is invoked.

The cheat is just an ArgScript::ICommand object; the ArgScript::ICommand::ParseLine() function will be called when the cheat is invoked.

void App::ICheatManager::RemoveCheat(const char* pString) pure virtual

Removes the cheat that is invoked with the given keyword from this manager.

Parameters
pString The keyword used to invoke the cheat. This is case insensitive and it can't contain whitespaces.

bool App::ICheatManager::ProcessLine(const char* pString) pure virtual

Called every time a line is submitted to the console.

Parameters
pString The text contents of the line.
Returns Whether the line was correctly processed or not.

ArgScript::ICommand* App::ICheatManager::GetCheat(const char* pKeyword) pure virtual

Returns the ArgScript::ICommand that is operating behind the requested cheat.

Parameters
pKeyword The keyword used to invoke the cheat.

size_t App::ICheatManager::GetKeywords(const char* pPattern, vector<const char*> dst) pure virtual

Gets all the cheat keywords in this manager that match the given pattern.

Parameters
pPattern The pattern keywords must match in order to be added to the vector.
dst A const char* vector where the keywords will be added.
Returns The number of keywords added.

The pattern uses the character '?' to allow any character, and '*' to allow any sequence of characters.