ReXGlue SDK
Loading...
Searching...
No Matches
console_command.h File Reference

Console commands an owner registers. More...

#include <memory>
#include <string>
#include <string_view>
#include <rex/platform.h>
#include <rex/result.h>
#include <rex/setting.h>
#include <rex/utility.h>

Go to the source code of this file.

Classes

class  rex::ConsoleCommand

Namespaces

namespace  rex

Macros

#define REX_COMMAND(name, help, fn)

Detailed Description

Console commands an owner registers.

License
BSD 3-Clause License See LICENSE file in the project root for full license text.

Macro Definition Documentation

◆ REX_COMMAND

#define REX_COMMAND ( name,
help,
fn )
Value:
this, #name, help, fn \
}
Definition console_command.h:26

Declares a console command inside a SettingOwner.

Parameters
nameThe member name.
REX_COMMAND(clear, "Clears the log", [](std::string_view) { return Ok(); });
#define REX_COMMAND(name, help, fn)
Definition console_command.h:63
Parameters
fnCalled with the argument text, returns Result<void>.