blob: 04102eec8096501aaaeed0af901d92b0b4a00004 [file] [log] [blame]
Brian Silvermanf7f267a2017-02-04 16:16:08 -08001/*----------------------------------------------------------------------------*/
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
16namespace frc {
17
18/**
19 * This class is a non-template base class for {@link SendableChooser}.
20 *
21 * It contains static, non-templated variables to avoid their duplication in the
22 * template class.
23 */
24class 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