Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Classes | Functions
lampda::modes::store Namespace Reference

Mode key store interface, see ContextTy::KeyProxy. More...

Functions

template<int16_t N>
static void LMBD_INLINE setValue (const char(&key)[N], uint32_t value)
 Set value for named key and read in in out.
 
template<int16_t N>
static bool LMBD_INLINE getValue (const char(&key)[N], uint32_t &out)
 Get value for named key and write it in out.
 
static void clear_stored ()
 Force clear the stored parameters.
 
static void LMBD_INLINE migrateIfNeeded ()
 Check for migration and erase all values if needed IT WILL ERASE THE WHOLE MEMORY, EVENT STATISTICS.
 

Detailed Description

Mode key store interface, see ContextTy::KeyProxy.

Function Documentation

◆ getValue()

template<int16_t N>
static bool LMBD_INLINE lampda::modes::store::getValue ( const char(&)  key[N],
uint32_t &  out 
)
inlinestatic

Get value for named key and write it in out.

Parameters
[in]keyKey string to be hashed as 31 bit integer
[out]outValue where result will be written if found
Returns
Returns True if key is found and out has been written

◆ setValue()

template<int16_t N>
static void LMBD_INLINE lampda::modes::store::setValue ( const char(&)  key[N],
uint32_t  value 
)
inlinestatic

Set value for named key and read in in out.

Parameters
[in]keyKey string to be hashed as 31 bit integer
[in]valueValue to be saved for key corresponding hash