8 #ifndef __SENDABLE_CHOOSER_H__
9 #define __SENDABLE_CHOOSER_H__
11 #include "SmartDashboard/Sendable.h"
12 #include "tables/ITable.h"
38 void AddObject(
const std::string &name,
void *
object);
39 void AddDefault(
const std::string &name,
void *
object);
42 virtual void InitTable(std::shared_ptr<ITable> subtable);
43 virtual std::shared_ptr<ITable>
GetTable()
const;
47 std::string m_defaultChoice;
48 std::map<std::string, void *> m_choices;
49 std::shared_ptr<ITable> m_table;
void * GetSelected()
Returns the selected option.
Definition: SendableChooser.cpp:47
The SendableChooser class is a useful tool for presenting a selection of options to the SmartDashboar...
Definition: SendableChooser.h:34
virtual void InitTable(std::shared_ptr< ITable > subtable)
Initializes a table for this sendable object.
Definition: SendableChooser.cpp:55
Definition: Sendable.h:15
virtual std::shared_ptr< ITable > GetTable() const
Definition: SendableChooser.cpp:68
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:36
virtual std::string GetSmartDashboardType() const
Definition: SendableChooser.cpp:70
void AddObject(const std::string &name, void *object)
Adds the given object to the list of options.
Definition: SendableChooser.cpp:23