10 :
Command(controller,
"message")
17 auto i :
xrange(levels.size())) {
18 if (level == levels[i]) {
22 throw CommandException(
"Unknown level string: ", level);
30 switch (tokens.size()) {
32 level = getLevel(tokens[2].getString());
35 cliComm.log(level, tokens[1].getString());
42 return "message <text> [<level>]\n"
43 "Print a message. (By default) this message will be shown in "
44 "a colored box at the top of the screen. It's possible to "
45 "specify a level for the message (e.g. 'info', 'warning' or "
51 if (tokens.size() == 3) {
static auto getLevelStrings()
CliComm & getCliComm() const
static void completeString(std::vector< std::string > &tokens, ITER begin, ITER end, bool caseSensitive=true)
void checkNumArgs(std::span< const TclObject > tokens, unsigned exactly, const char *errMessage) const
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this command.
MessageCommand(CommandController &controller)
void execute(std::span< const TclObject > tokens, TclObject &result) override
Execute this command.
std::string help(std::span< const TclObject > tokens) const override
Print help for this command.
This file implemented 3 utility functions:
constexpr auto xrange(T e)