16 #include "ErrorBase.h" 17 #include "networktables/NetworkTable.h" 39 std::vector<std::string>
GetKeys();
60 std::shared_ptr<nt::NetworkTable> m_table;
61 NT_EntryListener m_listener;
int64_t GetLong(llvm::StringRef key, int64_t defaultValue=0)
Returns the long (int64_t) at the given key.
Definition: Preferences.cpp:119
bool GetBoolean(llvm::StringRef key, bool defaultValue=false)
Returns the boolean at the given key.
Definition: Preferences.cpp:107
std::vector< std::string > GetKeys()
Returns a vector of all the keys.
Definition: Preferences.cpp:48
The preferences class provides a relatively simple way to save important values to the roboRIO to acc...
Definition: Preferences.h:35
void PutFloat(llvm::StringRef key, float value)
Puts the given float into the preferences table.
Definition: Preferences.cpp:174
static Preferences * GetInstance()
Get the one and only Preferences object.
Definition: Preferences.cpp:38
std::string GetString(llvm::StringRef key, llvm::StringRef defaultValue="")
Returns the string at the given key.
Definition: Preferences.cpp:58
void PutBoolean(llvm::StringRef key, bool value)
Puts the given boolean into the preferences table.
Definition: Preferences.cpp:188
float GetFloat(llvm::StringRef key, float defaultValue=0.0)
Returns the float at the given key.
Definition: Preferences.cpp:95
void PutString(llvm::StringRef key, llvm::StringRef value)
Puts the given string into the preferences table.
Definition: Preferences.cpp:132
double GetDouble(llvm::StringRef key, double defaultValue=0.0)
Returns the double at the given key.
Definition: Preferences.cpp:83
void PutLong(llvm::StringRef key, int64_t value)
Puts the given long (int64_t) into the preferences table.
Definition: Preferences.cpp:202
bool ContainsKey(llvm::StringRef key)
Returns whether or not there is a key with the given name.
Definition: Preferences.cpp:214
void Remove(llvm::StringRef key)
Remove a preference.
Definition: Preferences.cpp:223
Base class for most objects.
Definition: ErrorBase.h:74
int GetInt(llvm::StringRef key, int defaultValue=0)
Returns the int at the given key.
Definition: Preferences.cpp:71
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42
void PutDouble(llvm::StringRef key, double value)
Puts the given double into the preferences table.
Definition: Preferences.cpp:160
void PutInt(llvm::StringRef key, int value)
Puts the given int into the preferences table.
Definition: Preferences.cpp:146