Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / client / src / commands.h
blob0d77b38cc4639cb47bc6a45cfe2e36fbb1bf0496
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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>
7 //
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/>.
23 #ifndef CL_COMMANDS_H
24 #define CL_COMMANDS_H
26 #include "nel/misc/types_nl.h"
29 /// Function to release all things allocated for commands.
30 void releaseCommands();
32 /**
33 * User command class. This NeL command is binded to an action handler with the commands.xml file.
35 class CUserCommand : public NLMISC::ICommand
37 public:
38 // Mode
39 class CMode
41 public:
42 uint KeywordsCount;
43 std::string Action;
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);
51 // From ICommand
52 virtual bool execute(const std::string &rawCommandString, const std::vector<std::string> &args, NLMISC::CLog &log, bool quiet, bool human);
54 // Create a command
55 static void createCommand (const char *name, const char *action, const char *params);
57 // release memory
58 static void release();
60 // The command map
61 static std::map<std::string, CUserCommand*> CommandMap;
63 // Strings
64 CMode InfiniteMode;
65 std::map<uint, CMode> FixedArgModes;
66 std::string CommandName;
67 std::string Params;
70 #endif // CL_COMMANDS_H
72 /* End of console.h */