12 #include <wpi/StringMap.h> 13 #include <wpi/StringRef.h> 15 #include "SmartDashboard/SendableChooserBase.h" 37 static U _unwrap_smart_ptr(
const U& value);
40 static U* _unwrap_smart_ptr(
const std::unique_ptr<U>& value);
43 static std::weak_ptr<U> _unwrap_smart_ptr(
const std::shared_ptr<U>& value);
51 auto GetSelected() -> decltype(_unwrap_smart_ptr(m_choices[
""]));
58 #include "SendableChooser.inc" Definition: Utility.cpp:119
This class is a non-template base class for SendableChooser.
Definition: SendableChooserBase.h:24
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:63
The SendableChooser class is a useful tool for presenting a selection of options to the SmartDashboar...
Definition: SendableChooser.h:33
void AddDefault(wpi::StringRef name, T object)
Add the given object to the list of options and marks it as the default.
Definition: SendableChooser.inc:46
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Definition: SendableChooser.inc:77
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
Definition: SendableBuilder.h:23
void AddObject(wpi::StringRef name, T object)
Adds the given object to the list of options.
Definition: SendableChooser.inc:32