Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame] | 1 | /*----------------------------------------------------------------------------*/ |
Brian Silverman | 1a67511 | 2016-02-20 20:42:49 -0500 | [diff] [blame^] | 2 | /* Copyright (c) FIRST 2011-2016. All Rights Reserved. */ |
Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame] | 3 | /* Open Source Software - may be modified and shared by FRC teams. The code */ |
Brian Silverman | 1a67511 | 2016-02-20 20:42:49 -0500 | [diff] [blame^] | 4 | /* must be accompanied by the FIRST BSD license file in the root directory of */ |
| 5 | /* the project. */ |
Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame] | 6 | /*----------------------------------------------------------------------------*/ |
| 7 | |
| 8 | #ifndef __NETWORK_BUTTON_H__ |
| 9 | #define __NETWORK_BUTTON_H__ |
| 10 | |
| 11 | #include "Buttons/Button.h" |
| 12 | #include <string> |
| 13 | #include <memory> |
| 14 | |
| 15 | class NetworkButton : public Button { |
| 16 | public: |
| 17 | NetworkButton(const std::string &tableName, const std::string &field); |
| 18 | NetworkButton(std::shared_ptr<ITable> table, const std::string &field); |
| 19 | virtual ~NetworkButton() = default; |
| 20 | |
| 21 | virtual bool Get(); |
| 22 | |
| 23 | private: |
| 24 | std::shared_ptr<ITable> m_netTable; |
| 25 | std::string m_field; |
| 26 | }; |
| 27 | |
| 28 | #endif |