|
roo_prefs
API Documentation for roo_prefs
|
Low-level wrapper around the underlying preferences storage. More...
#include <preferences_store.h>
Public Member Functions | |
| bool | isKey (const char *key) |
| ClearResult | clear (const char *key) |
| template<typename T > | |
| WriteResult | writeObject (const char *key, const T &val) |
| WriteResult | writeBool (const char *key, bool val) |
| WriteResult | writeU8 (const char *key, uint8_t val) |
| WriteResult | writeI8 (const char *key, int8_t val) |
| WriteResult | writeU16 (const char *key, uint16_t val) |
| WriteResult | writeI16 (const char *key, int16_t val) |
| WriteResult | writeU32 (const char *key, uint32_t val) |
| WriteResult | writeI32 (const char *key, int32_t val) |
| WriteResult | writeU64 (const char *key, uint64_t val) |
| WriteResult | writeI64 (const char *key, int64_t val) |
| WriteResult | writeFloat (const char *key, float val) |
| WriteResult | writeDouble (const char *key, double val) |
| WriteResult | writeString (const char *key, roo::string_view val) |
| WriteResult | writeBytes (const char *key, const void *val, size_t len) |
| template<typename T > | |
| ReadResult | readObject (const char *key, T &val) |
| ReadResult | readBool (const char *key, bool &val) |
| ReadResult | readU8 (const char *key, uint8_t &val) |
| ReadResult | readI8 (const char *key, int8_t &val) |
| ReadResult | readU16 (const char *key, uint16_t &val) |
| ReadResult | readI16 (const char *key, int16_t &val) |
| ReadResult | readU32 (const char *key, uint32_t &val) |
| ReadResult | readI32 (const char *key, int32_t &val) |
| ReadResult | readU64 (const char *key, uint64_t &val) |
| ReadResult | readI64 (const char *key, int64_t &val) |
| ReadResult | readFloat (const char *key, float &val) |
| ReadResult | readDouble (const char *key, double &val) |
| ReadResult | readString (const char *key, std::string &val) |
| ReadResult | readBytes (const char *key, void *val, size_t max_len, size_t *out_len) |
| ReadResult | readBytesLength (const char *key, size_t *out_len) |
Friends | |
| class | Collection |
Low-level wrapper around the underlying preferences storage.
Definition at line 13 of file preferences_store.h.
| ClearResult roo_prefs::PreferencesStore::clear | ( | const char * | key | ) |
Definition at line 13 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| bool roo_prefs::PreferencesStore::isKey | ( | const char * | key | ) |
Definition at line 11 of file preferences_store.cpp.
| ReadResult roo_prefs::PreferencesStore::readBool | ( | const char * | key, |
| bool & | val | ||
| ) |
Definition at line 105 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readBytes | ( | const char * | key, |
| void * | val, | ||
| size_t | max_len, | ||
| size_t * | out_len | ||
| ) |
Definition at line 275 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readBytesLength | ( | const char * | key, |
| size_t * | out_len | ||
| ) |
Definition at line 290 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readDouble | ( | const char * | key, |
| double & | val | ||
| ) |
Definition at line 244 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readFloat | ( | const char * | key, |
| float & | val | ||
| ) |
Definition at line 230 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readI16 | ( | const char * | key, |
| int16_t & | val | ||
| ) |
Definition at line 160 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readI32 | ( | const char * | key, |
| int32_t & | val | ||
| ) |
Definition at line 188 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readI64 | ( | const char * | key, |
| int64_t & | val | ||
| ) |
Definition at line 216 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readI8 | ( | const char * | key, |
| int8_t & | val | ||
| ) |
Definition at line 132 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
|
inline |
Definition at line 51 of file preferences_store.h.
| ReadResult roo_prefs::PreferencesStore::readString | ( | const char * | key, |
| std::string & | val | ||
| ) |
Definition at line 258 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readU16 | ( | const char * | key, |
| uint16_t & | val | ||
| ) |
Definition at line 146 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readU32 | ( | const char * | key, |
| uint32_t & | val | ||
| ) |
Definition at line 174 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readU64 | ( | const char * | key, |
| uint64_t & | val | ||
| ) |
Definition at line 202 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| ReadResult roo_prefs::PreferencesStore::readU8 | ( | const char * | key, |
| uint8_t & | val | ||
| ) |
Definition at line 118 of file preferences_store.cpp.
References roo_prefs::kError, roo_prefs::kNotFound, roo_prefs::kOk, and roo_prefs::kWrongType.
| WriteResult roo_prefs::PreferencesStore::writeBool | ( | const char * | key, |
| bool | val | ||
| ) |
Definition at line 29 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeBytes | ( | const char * | key, |
| const void * | val, | ||
| size_t | len | ||
| ) |
Definition at line 17 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeDouble | ( | const char * | key, |
| double | val | ||
| ) |
Definition at line 79 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeFloat | ( | const char * | key, |
| float | val | ||
| ) |
Definition at line 74 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeI16 | ( | const char * | key, |
| int16_t | val | ||
| ) |
Definition at line 49 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeI32 | ( | const char * | key, |
| int32_t | val | ||
| ) |
Definition at line 59 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeI64 | ( | const char * | key, |
| int64_t | val | ||
| ) |
Definition at line 69 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeI8 | ( | const char * | key, |
| int8_t | val | ||
| ) |
Definition at line 39 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
|
inline |
Definition at line 20 of file preferences_store.h.
| WriteResult roo_prefs::PreferencesStore::writeString | ( | const char * | key, |
| roo::string_view | val | ||
| ) |
Definition at line 84 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeU16 | ( | const char * | key, |
| uint16_t | val | ||
| ) |
Definition at line 44 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeU32 | ( | const char * | key, |
| uint32_t | val | ||
| ) |
Definition at line 54 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeU64 | ( | const char * | key, |
| uint64_t | val | ||
| ) |
Definition at line 64 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
| WriteResult roo_prefs::PreferencesStore::writeU8 | ( | const char * | key, |
| uint8_t | val | ||
| ) |
Definition at line 34 of file preferences_store.cpp.
References roo_prefs::kError, and roo_prefs::kOk.
|
friend |
Definition at line 85 of file preferences_store.h.