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