1 #ifndef COMMON_COMMANDS_ALL_H
2 #define COMMON_COMMANDS_ALL_H
5 REGISTRY(GENERIC_COMMANDS, BITS(7))
6 #define GENERIC_COMMANDS_from(i) _GENERIC_COMMANDS_from(i, NULL)
7 REGISTER_REGISTRY(GENERIC_COMMANDS)
8 REGISTRY_SORT(GENERIC_COMMANDS)
10 #define GENERIC_COMMAND(id, description) \
11 CLASS(genericcommand_##id, Command) \
12 ATTRIB(genericcommand_##id, m_name, string, #id); \
13 ATTRIB(genericcommand_##id, m_description, string, description); \
14 ENDCLASS(genericcommand_##id) \
15 REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
16 METHOD(genericcommand_##id, m_invokecmd, void(int request, int arguments, string command))
18 STATIC_INIT(GENERIC_COMMANDS_aliases) {
19 FOREACH(GENERIC_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu"))));