16 #include <networktables/NetworkTable.h> 18 #include "ErrorBase.h" 40 std::vector<std::string>
GetKeys();
61 std::shared_ptr<nt::NetworkTable> m_table;
62 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:120
bool GetBoolean(llvm::StringRef key, bool defaultValue=false)
Returns the boolean at the given key.
Definition: Preferences.cpp:108
std::vector< std::string > GetKeys()
Returns a vector of all the keys.
Definition: Preferences.cpp:49
Definition: RobotController.cpp:14
The preferences class provides a relatively simple way to save important values to the roboRIO to acc...
Definition: Preferences.h:36
void PutFloat(llvm::StringRef key, float value)
Puts the given float into the preferences table.
Definition: Preferences.cpp:175
static Preferences * GetInstance()
Get the one and only Preferences object.
Definition: Preferences.cpp:39
std::string GetString(llvm::StringRef key, llvm::StringRef defaultValue="")
Returns the string at the given key.
Definition: Preferences.cpp:59
void PutBoolean(llvm::StringRef key, bool value)
Puts the given boolean into the preferences table.
Definition: Preferences.cpp:189
float GetFloat(llvm::StringRef key, float defaultValue=0.0)
Returns the float at the given key.
Definition: Preferences.cpp:96
void PutString(llvm::StringRef key, llvm::StringRef value)
Puts the given string into the preferences table.
Definition: Preferences.cpp:133
double GetDouble(llvm::StringRef key, double defaultValue=0.0)
Returns the double at the given key.
Definition: Preferences.cpp:84
void PutLong(llvm::StringRef key, int64_t value)
Puts the given long (int64_t) into the preferences table.
Definition: Preferences.cpp:203
bool ContainsKey(llvm::StringRef key)
Returns whether or not there is a key with the given name.
Definition: Preferences.cpp:215
void Remove(llvm::StringRef key)
Remove a preference.
Definition: Preferences.cpp:224
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:72
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:161
void PutInt(llvm::StringRef key, int value)
Puts the given int into the preferences table.
Definition: Preferences.cpp:147