Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
networktables
NetworkTableProvider.cpp
1
#include <map>
2
#include <string>
3
4
#include "tables/ITableProvider.h"
5
#include "networktables2/NetworkTableNode.h"
6
#include "networktables/NetworkTable.h"
7
8
9
#include "networktables/NetworkTableProvider.h"
10
11
12
13
using namespace
std;
14
15
16
17
NetworkTableProvider::NetworkTableProvider
(
NetworkTableNode
& _node) : node(_node){}
18
NetworkTableProvider::~NetworkTableProvider(){
19
while
(tables.size()>0){
20
map<std::string, NetworkTable*>::iterator it = tables.begin();
21
delete
it->second;
22
tables.erase(it);
23
}
24
}
25
26
ITable
* NetworkTableProvider::GetRootTable(){
27
return
GetTable
(
""
);
28
}
29
30
ITable
*
NetworkTableProvider::GetTable
(std::string key){
31
if
(tables.find(key) != tables.end())
32
{
33
return
tables[key];
34
}
35
else
36
{
37
NetworkTable
* table =
new
NetworkTable
(key, *
this
);
38
tables[key] = table;
39
return
table;
40
}
41
}
42
NetworkTableNode
Definition:
NetworkTableNode.h:32
ITable
Definition:
ITable.h:26
NetworkTableProvider::GetTable
ITable * GetTable(std::string key)
Definition:
NetworkTableProvider.cpp:30
NetworkTable
Definition:
NetworkTable.h:53
NetworkTableProvider::NetworkTableProvider
NetworkTableProvider(NetworkTableNode &node)
Definition:
NetworkTableProvider.cpp:17
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.