16 #include <networktables/NetworkTable.h> 18 #include "ErrorBase.h" 50 std::vector<std::string>
GetKeys();
199 std::shared_ptr<nt::NetworkTable> m_table;
200 NT_EntryListener m_listener;
float GetFloat(wpi::StringRef key, float defaultValue=0.0)
Returns the float at the given key.
Definition: Preferences.cpp:43
std::vector< std::string > GetKeys()
Returns a vector of all the keys.
Definition: Preferences.cpp:28
Definition: Utility.cpp:119
The preferences class provides a relatively simple way to save important values to the roboRIO to acc...
Definition: Preferences.h:36
void PutBoolean(wpi::StringRef key, bool value)
Puts the given boolean into the preferences table.
Definition: Preferences.cpp:79
static Preferences * GetInstance()
Get the one and only Preferences object.
Definition: Preferences.cpp:23
int64_t GetLong(wpi::StringRef key, int64_t defaultValue=0)
Returns the long (int64_t) at the given key.
Definition: Preferences.cpp:51
void PutLong(wpi::StringRef key, int64_t value)
Puts the given long (int64_t) into the preferences table.
Definition: Preferences.cpp:85
void Remove(wpi::StringRef key)
Remove a preference.
Definition: Preferences.cpp:95
void PutInt(wpi::StringRef key, int value)
Puts the given int into the preferences table.
Definition: Preferences.cpp:61
bool GetBoolean(wpi::StringRef key, bool defaultValue=false)
Returns the boolean at the given key.
Definition: Preferences.cpp:47
bool ContainsKey(wpi::StringRef key)
Returns whether or not there is a key with the given name.
Definition: Preferences.cpp:91
Base class for most objects.
Definition: ErrorBase.h:74
void PutFloat(wpi::StringRef key, float value)
Puts the given float into the preferences table.
Definition: Preferences.cpp:73
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
double GetDouble(wpi::StringRef key, double defaultValue=0.0)
Returns the double at the given key.
Definition: Preferences.cpp:39
int GetInt(wpi::StringRef key, int defaultValue=0)
Returns the int at the given key.
Definition: Preferences.cpp:35
void PutDouble(wpi::StringRef key, double value)
Puts the given double into the preferences table.
Definition: Preferences.cpp:67
void RemoveAll()
Remove all preferences.
Definition: Preferences.cpp:97
std::string GetString(wpi::StringRef key, wpi::StringRef defaultValue="")
Returns the string at the given key.
Definition: Preferences.cpp:30
void PutString(wpi::StringRef key, wpi::StringRef value)
Puts the given string into the preferences table.
Definition: Preferences.cpp:55