Now you can download a copy of these docs so you can use them offline! Download now
ITable.h
1 /*
2  * ITable.h
3  *
4  * Created on: Sep 19, 2012
5  * Author: Mitchell Wills
6  */
7 
8 #ifndef ITABLE_H_
9 #define ITABLE_H_
10 
11 
12 class ITable;
13 union EntryValue{
14  void* ptr;
15  bool b;
16  double f;
17 };
18 typedef union EntryValue EntryValue;
19 
20 
21 #include <string>
22 #include "networktables2/type/ComplexData.h"
23 #include "tables/ITableListener.h"
24 
25 
26 class ITable {
27 public:
28 
35  virtual bool ContainsKey(std::string key) = 0;
36 
44  virtual bool ContainsSubTable(std::string key) = 0;
45 
52  virtual ITable* GetSubTable(std::string key) = 0;
53 
54 
62  virtual EntryValue GetValue(std::string key) = 0;
70  virtual void PutValue(std::string key, ComplexData& value) = 0;
71 
72  virtual void RetrieveValue(std::string key, ComplexData& externalValue) = 0;
73 
74 
75 
82  virtual void PutNumber(std::string key, double value) = 0;
90  virtual double GetNumber(std::string key) = 0;
98  virtual double GetNumber(std::string key, double defaultValue) = 0;
99 
106  virtual void PutString(std::string key, std::string value) = 0;
107 
115  virtual std::string GetString(std::string key) = 0;
116 
124  virtual std::string GetString(std::string key, std::string defaultValue) = 0;
125 
132  virtual void PutBoolean(std::string key, bool value) = 0;
133 
141  virtual bool GetBoolean(std::string key) = 0;
142 
150  virtual bool GetBoolean(std::string key, bool defaultValue) = 0;
151 
157  virtual void AddTableListener(ITableListener* listener) = 0;
158 
165  virtual void AddTableListener(ITableListener* listener, bool immediateNotify) = 0;
166 
174  virtual void AddTableListener(std::string key, ITableListener* listener, bool immediateNotify) = 0;
175 
181  virtual void AddSubTableListener(ITableListener* listener) = 0;
182 
188  virtual void RemoveTableListener(ITableListener* listener) = 0;
189 
190 
191 };
192 
193 
194 #endif /* ITABLE_H_ */
virtual void RemoveTableListener(ITableListener *listener)=0
virtual void PutNumber(std::string key, double value)=0
virtual bool ContainsSubTable(std::string key)=0
Definition: ITable.h:26
virtual void AddTableListener(ITableListener *listener)=0
virtual ITable * GetSubTable(std::string key)=0
virtual void PutBoolean(std::string key, bool value)=0
virtual double GetNumber(std::string key)=0
virtual bool ContainsKey(std::string key)=0
virtual void AddSubTableListener(ITableListener *listener)=0
virtual void PutValue(std::string key, ComplexData &value)=0
virtual std::string GetString(std::string key)=0
virtual EntryValue GetValue(std::string key)=0
Definition: ITable.h:13
virtual bool GetBoolean(std::string key)=0
virtual void PutString(std::string key, std::string value)=0

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