WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
SendableChooserBase.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2017. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <memory>
11 #include <string>
12 
13 #include "SmartDashboard/Sendable.h"
14 #include "tables/ITable.h"
15 
16 namespace frc {
17 
24 class SendableChooserBase : public Sendable {
25  public:
26  virtual ~SendableChooserBase() = default;
27 
28  std::shared_ptr<ITable> GetTable() const override;
29  std::string GetSmartDashboardType() const override;
30 
31  protected:
32  static const char* kDefault;
33  static const char* kOptions;
34  static const char* kSelected;
35 
36  std::string m_defaultChoice;
37  std::shared_ptr<ITable> m_table;
38 };
39 
40 } // namespace frc
This class is a non-template base class for SendableChooser.
Definition: SendableChooserBase.h:24
std::string GetSmartDashboardType() const override
Definition: SendableChooserBase.cpp:20
std::shared_ptr< ITable > GetTable() const override
Definition: SendableChooserBase.cpp:16
Definition: Sendable.h:17