Xonotic
reg.qh File Reference
#include "command.qh"
+ Include dependency graph for reg.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GENERIC_COMMAND(id, description, menubased)
 

Functions

 STATIC_INIT (GENERIC_COMMANDS_aliases)
 

Variables

bool m_menubased
 

Macro Definition Documentation

◆ GENERIC_COMMAND

#define GENERIC_COMMAND (   id,
  description,
  menubased 
)
Value:
CLASS(genericcommand_##id, Command) \
ATTRIB(genericcommand_##id, m_name, string, #id); \
ATTRIB(genericcommand_##id, m_description, string, description); \
ATTRIB(genericcommand_##id, m_menubased, bool, menubased); \
ENDCLASS(genericcommand_##id) \
REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
#define NEW(cname,...)
Definition: oo.qh:105
bool m_menubased
Definition: reg.qh:10
CLASS(Object) Object
Definition: oo.qh:318
entity() spawn
int m_id
Definition: effect.qh:19
string m_name
Definition: scores.qh:135

Definition at line 12 of file reg.qh.

Function Documentation

◆ STATIC_INIT()

STATIC_INIT ( GENERIC_COMMANDS_aliases  )

Definition at line 21 of file reg.qh.

References FOREACH, and localcmd.

21  {
22  FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, ((it.m_menubased) ? "qc_cmd_svmenu" : "qc_cmd_svcl"))));
23 }
#define FOREACH(list, cond, body)
Definition: iter.qh:19

Variable Documentation

◆ m_menubased

bool m_menubased

Definition at line 10 of file reg.qh.