24 result = obj.
getInt(interp);
48 template<
typename T>
struct GetArg<
std::optional<T>> {
52 result = std::move(
t);
56 template<
typename T>
struct GetArg<
std::vector<T>> {
58 result.emplace_back();
76 [&flag](
Interpreter& , std::span<const TclObject> ) {
89 [name, &value](
Interpreter& interp, std::span<const TclObject> args) {
104 Interpreter& interp, std::span<const TclObject> inArgs, std::span<const ArgsInfo> table);
bool getBoolean(Interpreter &interp) const
double getDouble(Interpreter &interp) const
int getInt(Interpreter &interp) const
zstring_view getString() const
This file implemented 3 utility functions:
ArgsInfo valueArg(std::string_view name, T &value)
std::vector< TclObject > parseTclArgs(Interpreter &interp, std::span< const TclObject > inArgs, std::span< const ArgsInfo > table)
ArgsInfo flagArg(std::string_view name, bool &flag)
std::function< unsigned(Interpreter &, std::span< const TclObject >)> func
void operator()(Interpreter &, const TclObject &obj, TclObject &result) const
void operator()(Interpreter &interp, const TclObject &obj, bool &result) const
void operator()(Interpreter &interp, const TclObject &obj, double &result) const
void operator()(Interpreter &interp, const TclObject &obj, int &result) const
void operator()(Interpreter &interp, const TclObject &obj, std::optional< T > &result) const
void operator()(Interpreter &, const TclObject &obj, std::string &result) const
void operator()(Interpreter &, const TclObject &obj, std::string_view &result) const
void operator()(Interpreter &interp, const TclObject &obj, std::vector< T > &result) const