|
BenBot 1.7.5
A chess engine
|
#include <libbenbot/engine/CustomCommand.hpp>
Public Types | |
| using | Callback = std::function<void(string_view)> |
Static Public Member Functions | |
| static auto | void_cb (std::function< void()> &&func) -> Callback |
Public Attributes | |
| Callback | action |
| string_view | argsHelp |
| string_view | description |
| string_view | name |
A custom UCI command that the engine can respond to.
Definition at line 35 of file CustomCommand.hpp.
| using ben_bot::CustomCommand::Callback = std::function<void(string_view)> |
Function type that is invoked when this command is executed.
Definition at line 37 of file CustomCommand.hpp.
|
inlinestaticnodiscard |
Wraps a callback taking no arguments into a Callback for a command.
Definition at line 60 of file CustomCommand.hpp.
| Callback ben_bot::CustomCommand::action |
Function object that will be called when the command is executed. This callback will receive the rest of the command line as its argument.
Definition at line 47 of file CustomCommand.hpp.
| string_view ben_bot::CustomCommand::argsHelp |
A brief string to provide some documentation for the command's arguments. This will be shown in the engine's help output. For example, if the command expects a single filepath argument, this help string might be <path>.
Definition at line 57 of file CustomCommand.hpp.
| string_view ben_bot::CustomCommand::description |
Brief description of this command. This will be shown in the engine's help output.
Definition at line 50 of file CustomCommand.hpp.
| string_view ben_bot::CustomCommand::name |
The name of the command. This is the token the user should type in the CLI to execute the command.
Definition at line 42 of file CustomCommand.hpp.