Now you can download a copy of these docs so you can use them offline! Download now
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 
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 
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 
Definition: ITable.h:26
ITable * GetTable(std::string key)
NetworkTableProvider(NetworkTableNode &node)

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6