146 template <
class U = T>
155using All = std::tuple<Target, Targets, Duration, SteamId, PlayerOrSteamId, Int, U64, Word, Rest>;
167template <
class Tuple>
173 using Type = std::variant<std::monostate, A...>;
180template <std::size_t...
I>
183 return ((
static_cast<std::size_t
>(std::tuple_element_t<I, Args::All>::Kind) ==
I) && ...);
186static_assert(
ArgKindsMatchOrder(std::make_index_sequence<std::tuple_size_v<Args::All>>{}),
187 "Args::All must list the argument types in ArgKind declaration order.");
198 { T::Kind } -> std::convertible_to<ArgKind>;
212template <NamesArgKind T>
216 static constexpr bool Optional =
false;
224 static_assert(!
IsOptionalArg<T>,
"Args::Opt cannot wrap another Args::Opt; one marks the argument optional.");
227 static constexpr bool Optional =
true;
234 { ArgTrait<T>::Kind } -> std::convertible_to<ArgKind>;
263 for (std::size_t
i = 0;
i + 1 <
kinds.size(); ++
i)
297 if (std::holds_alternative<std::monostate>(
bound))
One connected player, owned by PlayerManager for the length of the connection.
Static utilities for converting between SteamID formats (64-bit, SteamID2, SteamID3).
std::tuple< Target, Targets, Duration, SteamId, PlayerOrSteamId, Int, U64, Word, Rest > All
constexpr bool IsOptionalArg
typename BoundArgFor< Args::All >::Type BoundArg
consteval bool RestIsLast()
static std::string ReadFile(const std::filesystem::path &path)
ArgKind
Which binder runs for one declared argument.
std::vector< ArgDesc > DescribeArgs()
consteval bool OptionalsTrail()
consteval bool ArgKindsMatchOrder(std::index_sequence< I... >)
typename ArgTrait< T >::Bound Bound
What one handler parameter type means to the framework.
static Args::Opt< T > From(const BoundArg &bound)
static T From(const BoundArg &bound)
std::chrono::seconds Value
static constexpr ArgKind Kind
static constexpr ArgKind Kind
decltype(U::Value) ValueOr(decltype(U::Value) fallback) const
static constexpr ArgKind Kind
static constexpr ArgKind Kind
static constexpr ArgKind Kind
Player * operator->() const
static constexpr ArgKind Kind
static constexpr ArgKind Kind
std::vector< Player * > Value
static constexpr ArgKind Kind
static constexpr ArgKind Kind
std::variant< std::monostate, A... > Type