roo_prefs
API Documentation for roo_prefs
Loading...
Searching...
No Matches
roo_prefs::PreferencesStore Class Reference

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
 

Detailed Description

Low-level wrapper around the underlying preferences storage.

Definition at line 13 of file preferences_store.h.

Member Function Documentation

◆ clear()

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.

◆ isKey()

bool roo_prefs::PreferencesStore::isKey ( const char *  key)

Definition at line 11 of file preferences_store.cpp.

◆ readBool()

ReadResult roo_prefs::PreferencesStore::readBool ( const char *  key,
bool &  val 
)

◆ readBytes()

ReadResult roo_prefs::PreferencesStore::readBytes ( const char *  key,
void *  val,
size_t  max_len,
size_t *  out_len 
)

◆ readBytesLength()

ReadResult roo_prefs::PreferencesStore::readBytesLength ( const char *  key,
size_t *  out_len 
)

◆ readDouble()

ReadResult roo_prefs::PreferencesStore::readDouble ( const char *  key,
double &  val 
)

◆ readFloat()

ReadResult roo_prefs::PreferencesStore::readFloat ( const char *  key,
float &  val 
)

◆ readI16()

ReadResult roo_prefs::PreferencesStore::readI16 ( const char *  key,
int16_t &  val 
)

◆ readI32()

ReadResult roo_prefs::PreferencesStore::readI32 ( const char *  key,
int32_t &  val 
)

◆ readI64()

ReadResult roo_prefs::PreferencesStore::readI64 ( const char *  key,
int64_t &  val 
)

◆ readI8()

ReadResult roo_prefs::PreferencesStore::readI8 ( const char *  key,
int8_t &  val 
)

◆ readObject()

template<typename T >
ReadResult roo_prefs::PreferencesStore::readObject ( const char *  key,
T &  val 
)
inline

Definition at line 51 of file preferences_store.h.

◆ readString()

ReadResult roo_prefs::PreferencesStore::readString ( const char *  key,
std::string &  val 
)

◆ readU16()

ReadResult roo_prefs::PreferencesStore::readU16 ( const char *  key,
uint16_t &  val 
)

◆ readU32()

ReadResult roo_prefs::PreferencesStore::readU32 ( const char *  key,
uint32_t &  val 
)

◆ readU64()

ReadResult roo_prefs::PreferencesStore::readU64 ( const char *  key,
uint64_t &  val 
)

◆ readU8()

ReadResult roo_prefs::PreferencesStore::readU8 ( const char *  key,
uint8_t &  val 
)

◆ writeBool()

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.

◆ writeBytes()

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.

◆ writeDouble()

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.

◆ writeFloat()

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.

◆ writeI16()

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.

◆ writeI32()

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.

◆ writeI64()

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.

◆ writeI8()

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.

◆ writeObject()

template<typename T >
WriteResult roo_prefs::PreferencesStore::writeObject ( const char *  key,
const T &  val 
)
inline

Definition at line 20 of file preferences_store.h.

◆ writeString()

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.

◆ writeU16()

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.

◆ writeU32()

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.

◆ writeU64()

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.

◆ writeU8()

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.

Friends And Related Symbol Documentation

◆ Collection

friend class Collection
friend

Definition at line 85 of file preferences_store.h.


The documentation for this class was generated from the following files: