![]() |
Iguana LATEST
Implementation Guardian of Analysis Algorithms
|
#include <ConcurrentParam.h>
abstract base class for concurrently mutable configuration parameters
Definition at line 19 of file ConcurrentParam.h.
Public Member Functions | |
| ConcurrentParam (std::string const &model, std::string const &name) | |
| virtual bool | HasKey (concurrent_key_t const key) const =0 |
| virtual T const | Load (concurrent_key_t const key) const =0 |
| access a stored value | |
| virtual bool | NeedsUpdate (T const &value, concurrent_key_t const key) const =0 |
| if either key is not found or value does not match the value at key, the caller likely needs to call Save | |
| virtual void | Save (T const &value, concurrent_key_t const key)=0 |
| modify a value | |
Protected Attributes | |
| std::shared_mutex | m_mutex |
| mutex for this ConcurrentParam | |
| std::string const | m_name |
| a name for this parameter | |

| iguana::ConcurrentParam< T >::ConcurrentParam | ( | std::string const & | model, |
| std::string const & | name ) |
| model | the concurrency model this instance must be |
| name | the name of this parameter |
|
pure virtual |
| key | the key |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
pure virtual |
access a stored value
| key | the access key |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
pure virtual |
if either key is not found or value does not match the value at key, the caller likely needs to call Save
| value | the expected value |
| key | the key for the expected value |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
pure virtual |
modify a value
| value | the value |
| key | the access key |
Implemented in iguana::MemoizedParam< T >, and iguana::SingleThreadParam< T >.
|
mutableprotected |
mutex for this ConcurrentParam
Definition at line 53 of file ConcurrentParam.h.
|
protected |
a name for this parameter
Definition at line 56 of file ConcurrentParam.h.