26class LoanedCommandInterface
29 using Deleter = std::function<void(
void)>;
31 explicit LoanedCommandInterface(CommandInterface & command_interface)
32 : LoanedCommandInterface(command_interface,
nullptr)
36 LoanedCommandInterface(CommandInterface & command_interface, Deleter && deleter)
37 : command_interface_(command_interface), deleter_(std::forward<Deleter>(deleter))
41 LoanedCommandInterface(
const LoanedCommandInterface & other) =
delete;
43 LoanedCommandInterface(LoanedCommandInterface && other) =
default;
45 virtual ~LoanedCommandInterface()
53 const std::string & get_name()
const {
return command_interface_.get_name(); }
55 const std::string & get_interface_name()
const {
return command_interface_.get_interface_name(); }
57 const std::string get_full_name()
const {
return command_interface_.get_full_name(); }
59 void set_value(
double val) { command_interface_.set_value(val); }
61 double get_value()
const {
return command_interface_.get_value(); }
64 CommandInterface & command_interface_;