WPILibC++
2020.3.2-60-g3011ebe
|
12 #include <wpi/StringMap.h>
13 #include <wpi/StringRef.h>
14 #include <wpi/deprecated.h>
16 #include "frc/smartdashboard/SendableBuilder.h"
17 #include "frc/smartdashboard/SendableChooserBase.h"
39 static U _unwrap_smart_ptr(
const U& value);
42 static U* _unwrap_smart_ptr(
const std::unique_ptr<U>& value);
45 static std::weak_ptr<U> _unwrap_smart_ptr(
const std::shared_ptr<U>& value);
64 WPI_DEPRECATED(
"use AddOption() instead")
78 WPI_DEPRECATED(
"use SetDefaultOption() instead")
83 auto GetSelected() -> decltype(_unwrap_smart_ptr(m_choices[
""]));
90 #include "frc/smartdashboard/SendableChooser.inc"
The SendableChooser class is a useful tool for presenting a selection of options to the SmartDashboar...
Definition: SendableChooser.h:35
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Definition: SendableChooser.inc:76
void AddDefault(wpi::StringRef name, T object)
Add the given object to the list of options and marks it as the default.
Definition: SendableChooser.h:79
void AddObject(wpi::StringRef name, T object)
Adds the given object to the list of options.
Definition: SendableChooser.h:65
WPILib C++ utilities (wpiutil) namespace.
Definition: Endian.h:31
void SetDefaultOption(wpi::StringRef name, T object)
Add the given object to the list of options and marks it as the default.
Definition: SendableChooser.inc:44
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
This class is a non-template base class for SendableChooser.
Definition: SendableChooserBase.h:28
A class that enforces constraints on the differential drive kinematics.
Definition: PDPSim.h:16
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:61
void AddOption(wpi::StringRef name, T object)
Adds the given object to the list of options.
Definition: SendableChooser.inc:30
Definition: SendableBuilder.h:23