DDraceNetwork Docs
IConsole Class Referenceabstract

#include <console.h>

Inheritance diagram for IConsole:
[legend]
Collaboration diagram for IConsole:
[legend]

Classes

class  CCommandInfo
 
class  IResult
 

Public Types

enum  {
  OUTPUT_LEVEL_STANDARD = 0 , OUTPUT_LEVEL_ADDINFO , OUTPUT_LEVEL_DEBUG , ACCESS_LEVEL_ADMIN = 0 ,
  ACCESS_LEVEL_MOD , ACCESS_LEVEL_HELPER , ACCESS_LEVEL_USER , TEMPCMD_NAME_LENGTH = 64 ,
  TEMPCMD_HELP_LENGTH = 192 , TEMPCMD_PARAMS_LENGTH = 96 , CMDLINE_LENGTH = 512 , CLIENT_ID_GAME = -2 ,
  CLIENT_ID_NO_GAME = -3
}
 
typedef void(* FTeeHistorianCommandCallback) (int ClientId, int FlagMask, const char *pCmd, IResult *pResult, void *pUser)
 
typedef void(* FPossibleCallback) (int Index, const char *pCmd, void *pUser)
 
typedef void(* FCommandCallback) (IResult *pResult, void *pUserData)
 
typedef void(* FChainCommandCallback) (IResult *pResult, void *pUserData, FCommandCallback pfnCallback, void *pCallbackUserData)
 
typedef bool(* FUnknownCommandCallback) (const char *pCommand, void *pUser)
 

Public Member Functions

virtual void Init ()=0
 
virtual const CCommandInfoFirstCommandInfo (int AccessLevel, int Flagmask) const =0
 
virtual const CCommandInfoGetCommandInfo (const char *pName, int FlagMask, bool Temp)=0
 
virtual int PossibleCommands (const char *pStr, int FlagMask, bool Temp, FPossibleCallback pfnCallback=EmptyPossibleCommandCallback, void *pUser=nullptr)=0
 
virtual void ParseArguments (int NumArgs, const char **ppArguments)=0
 
virtual void Register (const char *pName, const char *pParams, int Flags, FCommandCallback pfnFunc, void *pUser, const char *pHelp)=0
 
virtual void RegisterTemp (const char *pName, const char *pParams, int Flags, const char *pHelp)=0
 
virtual void DeregisterTemp (const char *pName)=0
 
virtual void DeregisterTempAll ()=0
 
virtual void Chain (const char *pName, FChainCommandCallback pfnChainFunc, void *pUser)=0
 
virtual void StoreCommands (bool Store)=0
 
virtual bool LineIsValid (const char *pStr)=0
 
virtual void ExecuteLine (const char *pStr, int ClientId=-1, bool InterpretSemicolons=true)=0
 
virtual void ExecuteLineFlag (const char *pStr, int FlasgMask, int ClientId=-1, bool InterpretSemicolons=true)=0
 
virtual void ExecuteLineStroked (int Stroke, const char *pStr, int ClientId=-1, bool InterpretSemicolons=true)=0
 
virtual bool ExecuteFile (const char *pFilename, int ClientId=-1, bool LogFailure=false, int StorageType=IStorage::TYPE_ALL)=0
 
virtual void Print (int Level, const char *pFrom, const char *pStr, ColorRGBA PrintColor=gs_ConsoleDefaultColor) const =0
 
virtual void SetTeeHistorianCommandCallback (FTeeHistorianCommandCallback pfnCallback, void *pUser)=0
 
virtual void SetUnknownCommandCallback (FUnknownCommandCallback pfnCallback, void *pUser)=0
 
virtual void InitChecksum (CChecksumData *pData) const =0
 
virtual void SetAccessLevel (int AccessLevel)=0
 
virtual bool Cheated () const =0
 
virtual int FlagMask () const =0
 
virtual void SetFlagMask (int FlagMask)=0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Static Public Member Functions

static const char * InterfaceName ()
 
static void EmptyPossibleCommandCallback (int Index, const char *pCmd, void *pUser)
 
static bool EmptyUnknownCommandCallback (const char *pCommand, void *pUser)
 
static LEVEL ToLogLevel (int ConsoleLevel)
 
static int ToLogLevelFilter (int ConsoleLevel)
 

Additional Inherited Members

- Protected Member Functions inherited from IInterface
IKernelKernel ()
 

Member Typedef Documentation

◆ FChainCommandCallback

typedef void(* IConsole::FChainCommandCallback) (IResult *pResult, void *pUserData, FCommandCallback pfnCallback, void *pCallbackUserData)

◆ FCommandCallback

typedef void(* IConsole::FCommandCallback) (IResult *pResult, void *pUserData)

◆ FPossibleCallback

typedef void(* IConsole::FPossibleCallback) (int Index, const char *pCmd, void *pUser)

◆ FTeeHistorianCommandCallback

typedef void(* IConsole::FTeeHistorianCommandCallback) (int ClientId, int FlagMask, const char *pCmd, IResult *pResult, void *pUser)

◆ FUnknownCommandCallback

typedef bool(* IConsole::FUnknownCommandCallback) (const char *pCommand, void *pUser)

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
OUTPUT_LEVEL_STANDARD 
OUTPUT_LEVEL_ADDINFO 
OUTPUT_LEVEL_DEBUG 
ACCESS_LEVEL_ADMIN 
ACCESS_LEVEL_MOD 
ACCESS_LEVEL_HELPER 
ACCESS_LEVEL_USER 
TEMPCMD_NAME_LENGTH 
TEMPCMD_HELP_LENGTH 
TEMPCMD_PARAMS_LENGTH 
CMDLINE_LENGTH 
CLIENT_ID_GAME 
CLIENT_ID_NO_GAME 

Member Function Documentation

◆ Chain()

virtual void IConsole::Chain ( const char *  pName,
FChainCommandCallback  pfnChainFunc,
void *  pUser 
)
pure virtual

Implemented in CConsole.

◆ Cheated()

virtual bool IConsole::Cheated ( ) const
pure virtual

Implemented in CConsole.

◆ DeregisterTemp()

virtual void IConsole::DeregisterTemp ( const char *  pName)
pure virtual

Implemented in CConsole.

◆ DeregisterTempAll()

virtual void IConsole::DeregisterTempAll ( )
pure virtual

Implemented in CConsole.

◆ EmptyPossibleCommandCallback()

static void IConsole::EmptyPossibleCommandCallback ( int  Index,
const char *  pCmd,
void *  pUser 
)
inlinestatic

◆ EmptyUnknownCommandCallback()

static bool IConsole::EmptyUnknownCommandCallback ( const char *  pCommand,
void *  pUser 
)
inlinestatic

◆ ExecuteFile()

virtual bool IConsole::ExecuteFile ( const char *  pFilename,
int  ClientId = -1,
bool  LogFailure = false,
int  StorageType = IStorage::TYPE_ALL 
)
pure virtual

Implemented in CConsole.

◆ ExecuteLine()

virtual void IConsole::ExecuteLine ( const char *  pStr,
int  ClientId = -1,
bool  InterpretSemicolons = true 
)
pure virtual

Implemented in CConsole.

◆ ExecuteLineFlag()

virtual void IConsole::ExecuteLineFlag ( const char *  pStr,
int  FlasgMask,
int  ClientId = -1,
bool  InterpretSemicolons = true 
)
pure virtual

Implemented in CConsole.

◆ ExecuteLineStroked()

virtual void IConsole::ExecuteLineStroked ( int  Stroke,
const char *  pStr,
int  ClientId = -1,
bool  InterpretSemicolons = true 
)
pure virtual

Implemented in CConsole.

◆ FirstCommandInfo()

virtual const CCommandInfo * IConsole::FirstCommandInfo ( int  AccessLevel,
int  Flagmask 
) const
pure virtual

Implemented in CConsole.

◆ FlagMask()

virtual int IConsole::FlagMask ( ) const
pure virtual

Implemented in CConsole.

◆ GetCommandInfo()

virtual const CCommandInfo * IConsole::GetCommandInfo ( const char *  pName,
int  FlagMask,
bool  Temp 
)
pure virtual

Implemented in CConsole.

◆ Init()

virtual void IConsole::Init ( )
pure virtual

Implemented in CConsole.

◆ InitChecksum()

virtual void IConsole::InitChecksum ( CChecksumData pData) const
pure virtual

Implemented in CConsole.

◆ InterfaceName()

static const char * IConsole::InterfaceName ( )
inlinestatic

◆ LineIsValid()

virtual bool IConsole::LineIsValid ( const char *  pStr)
pure virtual

Implemented in CConsole.

◆ ParseArguments()

virtual void IConsole::ParseArguments ( int  NumArgs,
const char **  ppArguments 
)
pure virtual

Implemented in CConsole.

◆ PossibleCommands()

virtual int IConsole::PossibleCommands ( const char *  pStr,
int  FlagMask,
bool  Temp,
FPossibleCallback  pfnCallback = EmptyPossibleCommandCallback,
void *  pUser = nullptr 
)
pure virtual

Implemented in CConsole.

◆ Print()

virtual void IConsole::Print ( int  Level,
const char *  pFrom,
const char *  pStr,
ColorRGBA  PrintColor = gs_ConsoleDefaultColor 
) const
pure virtual
Deprecated:
Prefer using the log_* functions from base/log.h instead of this function for the following reasons:
  • They support printf-formatting without a separate buffer.
  • They support all five log levels.
  • They do not require a pointer to IConsole to be used.

Implemented in CConsole.

◆ Register()

virtual void IConsole::Register ( const char *  pName,
const char *  pParams,
int  Flags,
FCommandCallback  pfnFunc,
void *  pUser,
const char *  pHelp 
)
pure virtual

Implemented in CConsole.

◆ RegisterTemp()

virtual void IConsole::RegisterTemp ( const char *  pName,
const char *  pParams,
int  Flags,
const char *  pHelp 
)
pure virtual

Implemented in CConsole.

◆ SetAccessLevel()

virtual void IConsole::SetAccessLevel ( int  AccessLevel)
pure virtual

Implemented in CConsole.

◆ SetFlagMask()

virtual void IConsole::SetFlagMask ( int  FlagMask)
pure virtual

Implemented in CConsole.

◆ SetTeeHistorianCommandCallback()

virtual void IConsole::SetTeeHistorianCommandCallback ( FTeeHistorianCommandCallback  pfnCallback,
void *  pUser 
)
pure virtual

Implemented in CConsole.

◆ SetUnknownCommandCallback()

virtual void IConsole::SetUnknownCommandCallback ( FUnknownCommandCallback  pfnCallback,
void *  pUser 
)
pure virtual

Implemented in CConsole.

◆ StoreCommands()

virtual void IConsole::StoreCommands ( bool  Store)
pure virtual

Implemented in CConsole.

◆ ToLogLevel()

LEVEL IConsole::ToLogLevel ( int  ConsoleLevel)
static

◆ ToLogLevelFilter()

int IConsole::ToLogLevelFilter ( int  ConsoleLevel)
static

The documentation for this class was generated from the following files: