1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
6 // Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
8 // This program is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #include "nel/misc/types_nl.h"
29 /// Function to release all things allocated for commands.
30 void releaseCommands();
33 * User command class. This NeL command is binded to an action handler with the commands.xml file.
35 class CUserCommand
: public NLMISC::ICommand
44 std::vector
<std::string
> Keywords
;
47 CUserCommand (const std::string
&commandName
, const std::string
&help
, const std::string
&argsHelp
);
49 void addMode (const std::string
&action
, uint numArg
, bool infiniteAgr
, const std::vector
<std::string
> &keywords
);
52 virtual bool execute(const std::string
&rawCommandString
, const std::vector
<std::string
> &args
, NLMISC::CLog
&log
, bool quiet
, bool human
);
55 static void createCommand (const char *name
, const char *action
, const char *params
);
58 static void release();
61 static std::map
<std::string
, CUserCommand
*> CommandMap
;
65 std::map
<uint
, CMode
> FixedArgModes
;
66 std::string CommandName
;
70 #endif // CL_COMMANDS_H
72 /* End of console.h */