Iguana 0.0.0
Implementation Guardian of Analysis Algorithms
|
#include <ConcurrentParam.h>
abstract base class for concurrently mutable configuration parameters
iguana::ConcurrentParamFactory
for instantiation Definition at line 17 of file ConcurrentParam.h.
Public Member Functions | |
ConcurrentParam (std::string const &model) | |
virtual T const | Load (concurrent_key_t const key) const =0 |
access a stored value | |
virtual void | Save (T const &value, concurrent_key_t const key)=0 |
modify a value | |
virtual bool | HasKey (concurrent_key_t const key) const =0 |
bool | NeedsHashing () const |
whether or not hashing is needed to use this parameter | |
virtual std::size_t | GetSize () const =0 |
bool | IsEmpty () const |
Protected Attributes | |
bool | m_needs_hashing |
whether this ConcurrentParam needs hashing for calling Load or Save | |
std::mutex | m_mutex |
mutex for this ConcurrentParam | |
bool | m_empty {true} |
whether this ConcurrentParam has something saved | |
iguana::ConcurrentParam< T >::ConcurrentParam | ( | std::string const & | model | ) |
model | the concurrency model this instance must be |
ConcurrentParamFactory
, the preferred instantiation method
|
pure virtual |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
pure virtual |
key | the key |
true
if key key
is used Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
inline |
true
if no value has been saved Definition at line 48 of file ConcurrentParam.h.
|
pure virtual |
access a stored value
key | the access key |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
inline |
whether or not hashing is needed to use this parameter
true
if hashing is needed Definition at line 42 of file ConcurrentParam.h.
|
pure virtual |
modify a value
value | the value |
key | the access key |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
protected |
whether this ConcurrentParam
has something saved
Definition at line 59 of file ConcurrentParam.h.
|
protected |
mutex for this ConcurrentParam
Definition at line 56 of file ConcurrentParam.h.
|
protected |
whether this ConcurrentParam
needs hashing for calling Load
or Save
Definition at line 53 of file ConcurrentParam.h.