2017-01-03 14:40:31 -08:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2017-08-23 22:06:13 -07:00
|
|
|
/* Copyright (c) 2017 FIRST. All Rights Reserved. */
|
2017-01-03 14:40:31 -08:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2017-12-04 23:28:33 -08:00
|
|
|
#include "SmartDashboard/SendableBase.h"
|
|
|
|
|
#include "networktables/NetworkTableEntry.h"
|
2017-01-03 14:40:31 -08:00
|
|
|
|
|
|
|
|
namespace frc {
|
|
|
|
|
|
|
|
|
|
/**
|
2017-11-16 00:33:51 -08:00
|
|
|
* This class is a non-template base class for SendableChooser.
|
2017-01-03 14:40:31 -08:00
|
|
|
*
|
|
|
|
|
* It contains static, non-templated variables to avoid their duplication in the
|
|
|
|
|
* template class.
|
|
|
|
|
*/
|
2017-12-04 23:28:33 -08:00
|
|
|
class SendableChooserBase : public SendableBase {
|
2017-01-03 14:40:31 -08:00
|
|
|
public:
|
2017-12-04 23:28:33 -08:00
|
|
|
~SendableChooserBase() override = default;
|
2017-01-03 14:40:31 -08:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
static const char* kDefault;
|
|
|
|
|
static const char* kOptions;
|
|
|
|
|
static const char* kSelected;
|
|
|
|
|
|
|
|
|
|
std::string m_defaultChoice;
|
2017-12-04 23:28:33 -08:00
|
|
|
nt::NetworkTableEntry m_selectedEntry;
|
2017-01-03 14:40:31 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace frc
|