roo_prefs
API Documentation for roo_prefs
Loading...
Searching...
No Matches
pref.h File Reference
#include <inttypes.h>
#include <string>
#include "roo_prefs/collection.h"
#include "roo_prefs/status.h"
#include "roo_prefs/transaction.h"
Include dependency graph for pref.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  roo_prefs::Pref< T >
 Persistent preference of a specific type. The preference will store its value in the preferences collection provided in the constructor, under the specified key (which needs to remain constant). The value is read lazily (on first access.) You can provide default value to be used if the collection does not contain the specified key. The value is cached in memory - subsequent reads will return the cached value. Writes always write to the persistent storage (and also, update the cache.) Read and write are performed within implicitly created transactions. If you have multiple properties that you want to read/write at the same time, you can read them under an explicit transaction: More...
 

Namespaces

namespace  roo_prefs
 Similar to Pref<T>, but does not immediately store written data in persistent storage. Instead, writes with a delay, which depends on whether the data stabilized or keeps changing.
 
namespace  roo_prefs::internal
 Implementation details follow.
 

Typedefs

using roo_prefs::Bool = Pref< bool >
 
using roo_prefs::Uint8 = Pref< uint8_t >
 
using roo_prefs::Int8 = Pref< int8_t >
 
using roo_prefs::Uint16 = Pref< uint16_t >
 
using roo_prefs::Int16 = Pref< int16_t >
 
using roo_prefs::Uint32 = Pref< uint32_t >
 
using roo_prefs::Int32 = Pref< int32_t >
 
using roo_prefs::Uint64 = Pref< uint64_t >
 
using roo_prefs::Int64 = Pref< int64_t >
 
using roo_prefs::Float = Pref< float >
 
using roo_prefs::Double = Pref< double >
 
using roo_prefs::String = Pref< std::string >