![]() |
Iguana 1.0.0
Implementation Guardian of Analysis Algorithms
|
#include <ConcurrentParam.h>
abstract base class for concurrently mutable configuration parameters
Definition at line 17 of file ConcurrentParam.h.
Public Member Functions | |
| ConcurrentParam (std::string const &model) | |
| virtual std::size_t | GetSize () const =0 |
| virtual bool | HasKey (concurrent_key_t const key) const =0 |
| bool | IsEmpty () const |
| virtual T const | Load (concurrent_key_t const key) const =0 |
| access a stored value | |
| bool | NeedsHashing () const |
| whether or not hashing is needed to use this parameter | |
| virtual void | Save (T const &value, concurrent_key_t const key)=0 |
| modify a value | |
Protected Attributes | |
| bool | m_empty {true} |
| whether this ConcurrentParam has something saved | |
| std::mutex | m_mutex |
| mutex for this ConcurrentParam | |
| bool | m_needs_hashing |
| whether this ConcurrentParam needs hashing for calling ::Load or ::Save | |

| iguana::ConcurrentParam< T >::ConcurrentParam | ( | std::string const & | model | ) |
| model | the concurrency model this instance must be |
|
pure virtual |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
pure virtual |
| key | the key |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
inline |
Definition at line 49 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
Definition at line 43 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 60 of file ConcurrentParam.h.
|
protected |
mutex for this ConcurrentParam
Definition at line 57 of file ConcurrentParam.h.
|
protected |
whether this ConcurrentParam needs hashing for calling ::Load or ::Save
Definition at line 54 of file ConcurrentParam.h.