Brian Silverman | f7f267a | 2017-02-04 16:16:08 -0800 | [diff] [blame^] | 1 | /*----------------------------------------------------------------------------*/ |
| 2 | /* Copyright (c) FIRST 2011-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 "tables/ITable.h" |
| 14 | |
| 15 | namespace frc { |
| 16 | |
| 17 | class Sendable { |
| 18 | public: |
| 19 | /** |
| 20 | * Initializes a table for this sendable object. |
| 21 | * @param subtable The table to put the values in. |
| 22 | */ |
| 23 | virtual void InitTable(std::shared_ptr<ITable> subtable) = 0; |
| 24 | |
| 25 | /** |
| 26 | * @return the table that is currently associated with the sendable |
| 27 | */ |
| 28 | virtual std::shared_ptr<ITable> GetTable() const = 0; |
| 29 | |
| 30 | /** |
| 31 | * @return the string representation of the named data type that will be used |
| 32 | * by the smart dashboard for this sendable |
| 33 | */ |
| 34 | virtual std::string GetSmartDashboardType() const = 0; |
| 35 | }; |
| 36 | |
| 37 | } // namespace frc |