3#ifndef ENGINE_CONSOLE_H
4#define ENGINE_CONSOLE_H
59 virtual float GetFloat(
unsigned Index)
const = 0;
60 virtual const char *
GetString(
unsigned Index)
const = 0;
61 virtual std::optional<ColorHSLA>
GetColor(
unsigned Index,
float DarkestLighting)
const = 0;
105 virtual void Register(
const char *pName,
const char *pParams,
int Flags,
FCommandCallback pfnFunc,
void *pUser,
const char *pHelp) = 0;
106 virtual void RegisterTemp(
const char *pName,
const char *pParams,
int Flags,
const char *pHelp) = 0;
113 virtual void ExecuteLine(
const char *pStr,
int ClientId = -1,
bool InterpretSemicolons =
true) = 0;
114 virtual void ExecuteLineFlag(
const char *pStr,
int FlasgMask,
int ClientId = -1,
bool InterpretSemicolons =
true) = 0;
115 virtual void ExecuteLineStroked(
int Stroke,
const char *pStr,
int ClientId = -1,
bool InterpretSemicolons =
true) = 0;
const char * m_pParams
Definition: console.h:83
int m_AccessLevel
Definition: console.h:76
virtual ~CCommandInfo()
Definition: console.h:80
const char * m_pHelp
Definition: console.h:82
int GetAccessLevel() const
Definition: console.h:87
CCommandInfo()
Definition: console.h:79
const char * m_pName
Definition: console.h:81
virtual const CCommandInfo * NextCommandInfo(int AccessLevel, int FlagMask) const =0
IResult(int ClientId)
Definition: console.h:50
virtual int GetInteger(unsigned Index) const =0
int NumArguments() const
Definition: console.h:65
virtual float GetFloat(unsigned Index) const =0
int m_ClientId
Definition: console.h:66
virtual void RemoveArgument(unsigned Index)=0
virtual std::optional< ColorHSLA > GetColor(unsigned Index, float DarkestLighting) const =0
unsigned m_NumArgs
Definition: console.h:47
virtual ~IResult()
Definition: console.h:56
IResult(const IResult &Other)
Definition: console.h:53
virtual int GetVictim() const =0
virtual const char * GetString(unsigned Index) const =0
virtual void DeregisterTemp(const char *pName)=0
virtual const CCommandInfo * FirstCommandInfo(int AccessLevel, int Flagmask) const =0
virtual void ExecuteLine(const char *pStr, int ClientId=-1, bool InterpretSemicolons=true)=0
static bool EmptyUnknownCommandCallback(const char *pCommand, void *pUser)
Definition: console.h:97
virtual void StoreCommands(bool Store)=0
virtual const CCommandInfo * GetCommandInfo(const char *pName, int FlagMask, bool Temp)=0
virtual void InitChecksum(CChecksumData *pData) const =0
virtual void ParseArguments(int NumArgs, const char **ppArguments)=0
bool(* FUnknownCommandCallback)(const char *pCommand, void *pUser)
Definition: console.h:94
virtual void ExecuteLineFlag(const char *pStr, int FlasgMask, int ClientId=-1, bool InterpretSemicolons=true)=0
void(* FChainCommandCallback)(IResult *pResult, void *pUserData, FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: console.h:93
virtual void Chain(const char *pName, FChainCommandCallback pfnChainFunc, void *pUser)=0
virtual int PossibleCommands(const char *pStr, int FlagMask, bool Temp, FPossibleCallback pfnCallback=EmptyPossibleCommandCallback, void *pUser=nullptr)=0
virtual void Print(int Level, const char *pFrom, const char *pStr, ColorRGBA PrintColor=gs_ConsoleDefaultColor) const =0
virtual void Register(const char *pName, const char *pParams, int Flags, FCommandCallback pfnFunc, void *pUser, const char *pHelp)=0
static int ToLogLevelFilter(int ConsoleLevel)
Definition: console.cpp:311
static void EmptyPossibleCommandCallback(int Index, const char *pCmd, void *pUser)
Definition: console.h:96
virtual bool ExecuteFile(const char *pFilename, int ClientId=-1, bool LogFailure=false, int StorageType=IStorage::TYPE_ALL)=0
virtual void ExecuteLineStroked(int Stroke, const char *pStr, int ClientId=-1, bool InterpretSemicolons=true)=0
void(* FPossibleCallback)(int Index, const char *pCmd, void *pUser)
Definition: console.h:91
virtual void RegisterTemp(const char *pName, const char *pParams, int Flags, const char *pHelp)=0
virtual void DeregisterTempAll()=0
virtual bool Cheated() const =0
virtual void SetTeeHistorianCommandCallback(FTeeHistorianCommandCallback pfnCallback, void *pUser)=0
void(* FCommandCallback)(IResult *pResult, void *pUserData)
Definition: console.h:92
@ TEMPCMD_HELP_LENGTH
Definition: console.h:34
@ ACCESS_LEVEL_ADMIN
Definition: console.h:28
@ OUTPUT_LEVEL_ADDINFO
Definition: console.h:25
@ ACCESS_LEVEL_HELPER
Definition: console.h:30
@ OUTPUT_LEVEL_DEBUG
Definition: console.h:26
@ CLIENT_ID_NO_GAME
Definition: console.h:40
@ ACCESS_LEVEL_USER
Definition: console.h:31
@ TEMPCMD_PARAMS_LENGTH
Definition: console.h:35
@ CLIENT_ID_GAME
Definition: console.h:39
@ CMDLINE_LENGTH
Definition: console.h:37
@ TEMPCMD_NAME_LENGTH
Definition: console.h:33
@ ACCESS_LEVEL_MOD
Definition: console.h:29
@ OUTPUT_LEVEL_STANDARD
Definition: console.h:24
virtual void SetUnknownCommandCallback(FUnknownCommandCallback pfnCallback, void *pUser)=0
virtual int FlagMask() const =0
virtual void SetFlagMask(int FlagMask)=0
virtual bool LineIsValid(const char *pStr)=0
static LEVEL ToLogLevel(int ConsoleLevel)
Definition: console.cpp:296
virtual void SetAccessLevel(int AccessLevel)=0
void(* FTeeHistorianCommandCallback)(int ClientId, int FlagMask, const char *pCmd, IResult *pResult, void *pUser)
Definition: console.h:90
@ TYPE_ALL
Definition: storage.h:26
std::unique_ptr< IConsole > CreateConsole(int FlagMask)
Definition: console.cpp:1053
static const ColorRGBA gs_ConsoleDefaultColor(1, 1, 1, 1)
#define MACRO_INTERFACE(Name)
Definition: kernel.h:25
LEVEL
Definition: log.h:14