|
BenBot 1.7.5
A chess engine
|
#include <libchess/uci/Options.hpp>
Public Types | |
| using | Variant = std::variant<bool, int, string_view> |
Public Member Functions | |
| Option ()=default | |
| Option (const Option &)=default | |
| Option (Option &&)=default | |
| virtual | ~Option () |
| virtual auto | get_declaration_string () const -> string=0 |
| virtual auto | get_default_value_variant () const -> Variant=0 |
| virtual auto | get_help () const noexcept -> string_view=0 |
| virtual auto | get_name () const noexcept -> string_view=0 |
| virtual auto | get_type () const noexcept -> string_view=0 |
| virtual auto | get_value_variant () const -> Variant=0 |
| virtual void | handle_setvalue (string_view arguments)=0 |
| virtual auto | has_value () const noexcept -> bool |
| Option & | operator= (const Option &)=default |
| Option & | operator= (Option &&)=default |
Base class for UCI [3] options.
Definition at line 38 of file Options.hpp.
| using chess::uci::Option::Variant = std::variant<bool, int, string_view> |
Represents a variant that can hold any of the derived class's value types.
Definition at line 68 of file Options.hpp.
|
default |
|
virtual |
|
default |
|
default |
|
nodiscardpure virtual |
Returns the option's declaration string suitable for sending to the GUI. The returned string includes the "option" token.
Implemented in chess::uci::Action, chess::uci::BoolOption, chess::uci::ComboOption, chess::uci::IntOption, and chess::uci::StringOption.
|
nodiscardpure virtual |
Returns this option's default value, as a variant. Note that if has_value() returns false, you must not call this method!
Implemented in chess::uci::Action, chess::uci::BoolOption, chess::uci::ComboOption, chess::uci::IntOption, and chess::uci::StringOption.
|
nodiscardpure virtualnoexcept |
Returns the help string for this option.
Implemented in chess::uci::Action, chess::uci::BoolOption, chess::uci::ComboOption, chess::uci::IntOption, and chess::uci::StringOption.
|
nodiscardpure virtualnoexcept |
Returns this option's name.
Implemented in chess::uci::Action, chess::uci::BoolOption, chess::uci::ComboOption, chess::uci::IntOption, and chess::uci::StringOption.
|
nodiscardpure virtualnoexcept |
Returns a textual representation of this option's type.
Implemented in chess::uci::Action, chess::uci::BoolOption, chess::uci::ComboOption, chess::uci::IntOption, and chess::uci::StringOption.
|
nodiscardpure virtual |
Returns this option's current value, as a variant. Note that if has_value() returns false, you must not call this method!
Implemented in chess::uci::Action, chess::uci::BoolOption, chess::uci::ComboOption, chess::uci::IntOption, and chess::uci::StringOption.
|
pure virtual |
Will be called with everything in the "setoption" command after the option name. This is typically not called directly by user code.
Implemented in chess::uci::Action, chess::uci::BoolOption, chess::uci::ComboOption, chess::uci::IntOption, and chess::uci::StringOption.
|
inlinenodiscardvirtualnoexcept |
Returns true if this option type has an associated value. False only for Action options.
Reimplemented in chess::uci::Action.
Definition at line 65 of file Options.hpp.