8 #ifndef NTCORE_TABLES_ITABLE_H_
9 #define NTCORE_TABLES_ITABLE_H_
15 #include <wpi/StringRef.h>
16 #include <wpi/Twine.h>
17 #include <wpi/deprecated.h>
19 #include "networktables/NetworkTableValue.h"
30 class WPI_DEPRECATED("Use NetworkTable directly") ITable {
38 virtual bool ContainsKey(
const wpi::Twine& key)
const = 0;
48 virtual bool ContainsSubTable(
const wpi::Twine& key)
const = 0;
56 virtual std::shared_ptr<nt::NetworkTable> GetSubTable(
63 virtual std::vector<std::string> GetKeys(
int types = 0)
const = 0;
68 virtual std::vector<std::string> GetSubTables()
const = 0;
100 virtual void SetFlags(
wpi::StringRef key,
unsigned int flags) = 0;
109 virtual void ClearFlags(
wpi::StringRef key,
unsigned int flags) = 0;
124 virtual void Delete(
const wpi::Twine& key) = 0;
133 virtual std::shared_ptr<nt::Value> GetValue(
const wpi::Twine& key)
const = 0;
141 virtual bool SetDefaultValue(
const wpi::Twine& key,
142 std::shared_ptr<nt::Value> defaultValue) = 0;
152 std::shared_ptr<nt::Value> value) = 0;
169 virtual bool SetDefaultNumber(
wpi::StringRef key,
double defaultValue) = 0;
179 virtual double GetNumber(
wpi::StringRef key,
double defaultValue)
const = 0;
229 virtual bool SetDefaultBoolean(
wpi::StringRef key,
bool defaultValue) = 0;
240 virtual bool GetBoolean(
wpi::StringRef key,
bool defaultValue)
const = 0;
279 virtual std::vector<int> GetBooleanArray(
311 virtual std::vector<double> GetNumberArray(
329 virtual bool SetDefaultStringArray(
343 virtual std::vector<std::string> GetStringArray(
382 virtual void AddTableListener(ITableListener* listener) = 0;
391 virtual void AddTableListener(ITableListener* listener,
392 bool immediateNotify) = 0;
402 virtual void AddTableListenerEx(ITableListener* listener,
403 unsigned int flags) = 0;
413 virtual void AddTableListener(
wpi::StringRef key, ITableListener* listener,
414 bool immediateNotify) = 0;
425 virtual void AddTableListenerEx(
wpi::StringRef key, ITableListener* listener,
426 unsigned int flags) = 0;
432 virtual void AddSubTableListener(ITableListener* listener) = 0;
440 virtual void AddSubTableListener(ITableListener* listener,
441 bool localNotify) = 0;
448 virtual void RemoveTableListener(ITableListener* listener) = 0;
456 #endif // NTCORE_TABLES_ITABLE_H_
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: ArrayRef.h:41
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79