14 #include "SmartDashboard/Sendable.h"
15 #include "tables/ITable.h"
36 void AddObject(
const std::string& name,
void*
object);
37 void AddDefault(
const std::string& name,
void*
object);
40 void InitTable(std::shared_ptr<ITable> subtable)
override;
41 std::shared_ptr<ITable>
GetTable()
const override;
45 std::string m_defaultChoice;
46 std::map<std::string, void*> m_choices;
47 std::shared_ptr<ITable> m_table;
void AddObject(const std::string &name, void *object)
Adds the given object to the list of options.
Definition: SendableChooser.cpp:25
std::string GetSmartDashboardType() const override
Definition: SendableChooser.cpp:75
void InitTable(std::shared_ptr< ITable > subtable) override
Initializes a table for this sendable object.
Definition: SendableChooser.cpp:60
The SendableChooser class is a useful tool for presenting a selection of options to the SmartDashboar...
Definition: SendableChooser.h:32
std::shared_ptr< ITable > GetTable() const override
Definition: SendableChooser.cpp:73
Definition: Sendable.h:17
void AddDefault(const std::string &name, void *object)
Add the given object to the list of options and marks it as the default.
Definition: SendableChooser.cpp:39
void * GetSelected()
Returns the selected option.
Definition: SendableChooser.cpp:52