35 #include "../shared/cxx.h"
36 #include "../shared/sharedptr.h"
39 #include "../shared/cxx.h"
77 void Cmd_PrintDebugCommands(
void);
99 virtual void onAdd (
const char* cmdName) = 0;
100 virtual void onRemove (
const char* cmdName) = 0;
171 void Cmd_TokenizeString(
const char* text,
bool macroExpand,
bool replaceWhitespaces =
true);
208 #include "ScopedCommand.h"
void Cmd_RemoveCommand(const char *cmd_name)
Removes a command from script interface.
void Cbuf_Init(void)
allocates an initial text buffer that will grow as needed
void void Cbuf_InsertText(const char *text)
when a command wants to issue other commands immediately, the text is
void Cbuf_AddEarlyCommands(bool clear)
adds all the +set commands from the command line
void Cmd_AddCommand(const char *cmd_name, xcommand_t function, const char *desc=nullptr)
called by the init functions of other parts of the program to register commands and functions to call...
void Cbuf_CopyToDefer(void)
These two functions are used to defer any pending commands while a map is being loaded.
void Cmd_ForwardToServer(void)
adds the current command line as a clc_stringcmd to the client message. things like godmode...
void Cmd_UnRegisterCmdListener(CmdListenerPtr listener)
Unregisters a command listener.
virtual void onRemove(const char *cmdName)=0
int Cmd_CompleteCommand(const char *partial, const char **match)
Unix like tab completion for console commands.
bool Cmd_Exists(const char *cmd_name)
used by the cvar code to check for cvar / command name overlap
void Cmd_Dummy_f(void)
Dummy binding if you don't want unknown commands forwarded to the server.
void Cmd_AddParamCompleteFunction(const char *cmd_name, int(*function)(const char *partial, const char **match))
bool Cbuf_AddLateCommands(void)
adds all the remaining + commands from the command line
const char * Cmd_Args(void)
Returns a single string containing argv(1) to argv(argc()-1)
void Cbuf_InsertFromDefer(void)
Copies back any deferred commands.
int Cmd_CompleteCommandParameters(const char *command, const char *partial, const char **match)
attempts to match a partial command for automatic command line completion returns nullptr if nothing ...
void Cmd_TableCheck(void)
Check both the functiontable and the associated hashtable for invalid entries.
void Cmd_TableAddList(const cmdList_t *cmdList)
void Cmd_BufClear(void)
Clears the command execution buffer.
void Cmd_TokenizeString(const char *text, bool macroExpand, bool replaceWhitespaces=true)
Parses the given string into command line tokens.
const char * Cmd_Argv(int arg)
Returns a given argument.
void Cmd_ExecuteString(const char *text,...) __attribute__((format(__printf__
Parses a single line of text into arguments and tries to execute it as if it was typed at the console...
void void Cmd_vExecuteString(const char *fmt, va_list ap)
void Cbuf_AddText(const char *format,...) __attribute__((format(__printf__
const GLuint *typedef void(APIENTRY *GenRenderbuffersEXT_t)(GLsizei
int Cmd_Argc(void)
The functions that execute commands get their parameters with these functions. Cmd_Argv() will return...
Listener for command changes.
SharedPtr< CmdListener > CmdListenerPtr
bool Cmd_GenericCompleteFunction(char const *candidate, char const *partial, char const **match)
void Cmd_AddUserdata(const char *cmd_name, void *userdata)
Adds userdata to the console command.
void * Cmd_Userdata(void)
Return the userdata of the called command.
void Cmd_RegisterCmdListener(CmdListenerPtr listener)
Registers a command listener.
virtual void onAdd(const char *cmdName)=0
struct cmdList_s cmdList_t
void * Cmd_GetUserdata(const char *cmd_name)
Fetches the userdata for a console command.
void Cmd_WriteAliases(qFILE *f)
Writes the persistent aliases to the given filehandle.
const char * Cmd_GetCommandDesc(const char *command)
Searches for the description of a given command.
void Cbuf_Execute(void)
Pulls off terminated lines of text from the command buffer and sends them through Cmd_ExecuteString...
void format(__printf__, 1, 2)))
void Cmd_TableRemoveList(const cmdList_t *cmdList)