31 requires std::copy_constructible<T> && std::default_initializable<T>
36 static U _unwrap_smart_ptr(
const U&
value);
39 static U* _unwrap_smart_ptr(
const std::unique_ptr<U>&
value);
42 static std::weak_ptr<U> _unwrap_smart_ptr(
const std::shared_ptr<U>&
value);
83 auto GetSelected() ->
decltype(_unwrap_smart_ptr(m_choices[
""]));
This file defines the StringMap class.
This class is a non-template base class for SendableChooser.
Definition: SendableChooserBase.h:26
The SendableChooser class is a useful tool for presenting a selection of options to the SmartDashboar...
Definition: SendableChooser.h:32
SendableChooser & operator=(SendableChooser &&rhs)=default
auto GetSelected() -> decltype(_unwrap_smart_ptr(m_choices[""]))
Returns a copy of the selected option (a raw pointer U* if T = std::unique_ptr<U> or a std::weak_ptr<...
Definition: SendableChooser.inc:35
SendableChooser(SendableChooser &&rhs)=default
void AddOption(std::string_view name, T object)
Adds the given object to the list of options.
Definition: SendableChooser.inc:22
~SendableChooser() override=default
void SetDefaultOption(std::string_view name, T object)
Add the given object to the list of options and marks it as the default.
Definition: SendableChooser.inc:28
SendableChooser()=default
void InitSendable(nt::NTSendableBuilder &builder) override
Initializes this Sendable object.
Definition: SendableChooser.inc:53
Definition: NTSendableBuilder.h:18
basic_string_view< char > string_view
Definition: core.h:520
Definition: AprilTagPoseEstimator.h:15