mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
This is the changes made by Patrick Plenefisch converting the native code to use CMake and the CMake Maven Plugin, as opposed to the native Maven plugin. This is to allow for compatibility with newer versions of the GCC toolchain. All the cpp sources were moved from maven style directories to cpp style directories for CMake. Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593
49 lines
925 B
C++
49 lines
925 B
C++
#ifndef _NETWORKTABLEPROVIDER_H_
|
|
#define _NETWORKTABLEPROVIDER_H_
|
|
|
|
|
|
class NetworkTableProvider;
|
|
|
|
#include <string>
|
|
|
|
#include "tables/ITableProvider.h"
|
|
#include "networktables2/NetworkTableNode.h"
|
|
#include "networktables/NetworkTable.h"
|
|
|
|
using namespace std;
|
|
|
|
class NetworkTableProvider : public ITableProvider
|
|
{
|
|
private:
|
|
NetworkTableNode& node;
|
|
map<std::string, NetworkTable*> tables;
|
|
|
|
/**
|
|
* Create a new NetworkTableProvider for a given NetworkTableNode
|
|
* @param node the node that handles the actual network table
|
|
*/
|
|
public:
|
|
NetworkTableProvider(NetworkTableNode& node);
|
|
virtual ~NetworkTableProvider();
|
|
|
|
ITable* GetRootTable();
|
|
|
|
ITable* GetTable(std::string key);
|
|
|
|
/**
|
|
* @return the Network Table node that backs the Tables returned by this provider
|
|
*/
|
|
NetworkTableNode& GetNode() {
|
|
return node;
|
|
};
|
|
|
|
/**
|
|
* close the backing network table node
|
|
*/
|
|
void Close() {
|
|
node.Close();
|
|
};
|
|
};
|
|
|
|
#endif
|