Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame^] | 1 | /*----------------------------------------------------------------------------*/ |
| 2 | /* Copyright (c) FIRST 2011. All Rights Reserved. |
| 3 | */ |
| 4 | /* Open Source Software - may be modified and shared by FRC teams. The code */ |
| 5 | /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ |
| 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 |