base class for an entity onto which StrategyInfo objects may be placed More...
#include <strategy-info-host.hpp>
Public Member Functions | |
template<typename T > | |
shared_ptr< T > | getStrategyInfo () const |
get a StrategyInfo item More... | |
template<typename T > | |
void | setStrategyInfo (shared_ptr< T > strategyInfo) |
set a StrategyInfo item More... | |
template<typename T , typename... A> | |
shared_ptr< T > | getOrCreateStrategyInfo (A &&...args) |
get or create a StrategyInfo item More... | |
void | clearStrategyInfo () |
clear all StrategyInfo items More... | |
base class for an entity onto which StrategyInfo objects may be placed
Definition at line 35 of file strategy-info-host.hpp.
shared_ptr< T > nfd::StrategyInfoHost::getStrategyInfo | ( | ) | const |
get a StrategyInfo item
T | type of StrategyInfo, must be a subclass of from nfd::fw::StrategyInfo |
nullptr | if no StrategyInfo of type T is stored |
Definition at line 75 of file strategy-info-host.hpp.
Referenced by nfd::measurements::EntryWithStrategyInfo< T >::operator()().
void nfd::StrategyInfoHost::setStrategyInfo | ( | shared_ptr< T > | strategyInfo | ) |
set a StrategyInfo item
T | type of StrategyInfo, must be a subclass of from nfd::fw::StrategyInfo |
Definition at line 89 of file strategy-info-host.hpp.
Referenced by getOrCreateStrategyInfo().
shared_ptr< T > nfd::StrategyInfoHost::getOrCreateStrategyInfo | ( | A &&... | args | ) |
get or create a StrategyInfo item
T | type of StrategyInfo, must be a subclass of from nfd::fw::StrategyInfo |
If no StrategyInfo of type T is stored, it's created with args
; otherwise, the existing item is returned.
Definition at line 104 of file strategy-info-host.hpp.
References setStrategyInfo().
Referenced by nfd::fw::RetxSuppressionExponential::decide().
void nfd::StrategyInfoHost::clearStrategyInfo | ( | ) |
clear all StrategyInfo items
Definition at line 31 of file strategy-info-host.cpp.