TDelayedParameter< T > Class Template Reference

A parameter proxy object with a key to identify it. More...

#include <mia/core/delayedparameter.hh>

Public Member Functions

const T get () const
 
const std::string & get_key () const
 
bool key_is_valid () const
 
bool pool_has_key () const
 
 TDelayedParameter ()=default
 
 TDelayedParameter (const std::string &key)
 

Detailed Description

template<typename T>
class TDelayedParameter< T >

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.

See also
CDatapool.

Definition at line 46 of file delayedparameter.hh.

Constructor & Destructor Documentation

◆ TDelayedParameter() [1/2]

template<typename T >
TDelayedParameter< T >::TDelayedParameter ( )
default

◆ TDelayedParameter() [2/2]

template<typename T >
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 83 of file delayedparameter.hh.

Member Function Documentation

◆ get()

template<typename T >
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 90 of file delayedparameter.hh.

References CDatapool::get(), and CDatapool::instance().

◆ get_key()

template<typename T >
const std::string & TDelayedParameter< T >::get_key ( ) const

Definition at line 113 of file delayedparameter.hh.

References NS_MIA_END.

◆ key_is_valid()

template<typename T >
bool TDelayedParameter< T >::key_is_valid ( ) const

Check if this key is actually valid (i.e. not empty)

Returns
true if the key is valid

Definition at line 107 of file delayedparameter.hh.

◆ pool_has_key()

template<typename T >
bool TDelayedParameter< T >::pool_has_key ( ) const

Check if the key is available in the data bool.

Returns
true if the key is available

Definition at line 100 of file delayedparameter.hh.

References CDatapool::has_key(), and CDatapool::instance().


The documentation for this class was generated from the following file: