12 std::string_view name,
16 : callbackSetting2(std::in_place,
17 controller, name, description, std::string_view{},
19 , callbackSetting(*callbackSetting2)
20 , useCliComm(useCliComm_)
38 if (callback.empty())
return {};
41 return executeCommon(command);
47 if (callback.empty())
return {};
50 return executeCommon(command);
56 if (callback.empty())
return {};
59 return executeCommon(command);
65 if (callback.empty())
return {};
68 return executeCommon(command);
74 if (callback.empty())
return {};
77 return executeCommon(command);
84 }
catch (CommandException& e) {
86 "Error executing callback function \"",
87 getSetting().getFullName(),
"\": ", e.getMessage());
92 std::cerr << message <<
'\n';
void printWarning(std::string_view message)
virtual CliComm & getCliComm()=0
const TclObject & getValue() const final
Gets the current value of this setting as a TclObject.
Interpreter & getInterpreter() const
CommandController & getCommandController() const
TclObject getValue() const
StringSetting & getSetting() const
TclCallback(CommandController &controller, std::string_view name, static_string_view description, bool useCliComm=true, bool save=true)
TclObject executeCommand(Interpreter &interp, bool compile=false)
Interpret this TclObject as a command and execute it.
This file implemented 3 utility functions:
TclObject makeTclList(Args &&... args)
std::string strCat(Ts &&...ts)