A parameter proxy object with a key to identify it. More...
#include <mia/core/delayedparameter.hh>
Public Member Functions | |
const T | get () const |
bool | key_is_valid () const |
bool | pool_has_key () const |
TDelayedParameter ()=default | |
TDelayedParameter (const std::string &key) | |
A parameter proxy object with a key to identify it.
This template is used to hold reference to data that may not yet be available and will be/or is stored in the internal data pool. One axample for its usage is to pass parameters to the filters in a filter pipeline that are only created after the filters itself is created.
Definition at line 46 of file delayedparameter.hh.
|
default |
TDelayedParameter< T >::TDelayedParameter | ( | const std::string & | key) |
Assosiate the parameter with its key in the data pool. At creation time, the data doesn't have to be available in the data pool.
Definition at line 81 of file delayedparameter.hh.
const T TDelayedParameter< T >::get | ( | ) | const |
Get the data assosiated with this parameter. Throws std::invalid_argument if the key is not available in the data pool
Definition at line 88 of file delayedparameter.hh.
References CDatapool::get(), and CDatapool::instance().
bool TDelayedParameter< T >::key_is_valid | ( | ) | const |
Check if this key is actually valid (i.e. not empty)
Definition at line 105 of file delayedparameter.hh.
bool TDelayedParameter< T >::pool_has_key | ( | ) | const |
Check if the key is available in the data bool.
Definition at line 98 of file delayedparameter.hh.
References CDatapool::has_key(), and CDatapool::instance().