ewmscp  ..
Public Member Functions | Private Attributes | List of all members
dCapCfgTimePar< T > Class Template Reference
Inheritance diagram for dCapCfgTimePar< T >:
[legend]
Collaboration diagram for dCapCfgTimePar< T >:
[legend]

Public Member Functions

 dCapCfgTimePar (const std::string &optName, const std::string &description, void(*setter)(T))
 
void applySingle () override
 
- Public Member Functions inherited from dCapConfigParameter
virtual void fForbid (options::base &)
 
 dCapConfigParameter ()
 

Private Attributes

options::single< std::chrono::seconds > option
 
void(* set )(T)
 

Additional Inherited Members

- Static Public Member Functions inherited from dCapConfigParameter
static void apply ()
 

Detailed Description

template<typename T>
class dCapCfgTimePar< T >

Definition at line 89 of file dcapCommon.cpp.

Constructor & Destructor Documentation

◆ dCapCfgTimePar()

template<typename T >
dCapCfgTimePar< T >::dCapCfgTimePar ( const std::string &  optName,
const std::string &  description,
void(*)(T)  setter 
)
inline

Definition at line 93 of file dcapCommon.cpp.

95  :
96  option('\0', parPrefix + optName, description),
97  set(setter) {
98  }

Member Function Documentation

◆ applySingle()

template<typename T >
void dCapCfgTimePar< T >::applySingle ( )
inlineoverridevirtual

Implements dCapConfigParameter.

Definition at line 99 of file dcapCommon.cpp.

99  {
100  if (option.fIsSet()) {
101  set(option.count());
102  }
103  }

References options::base::fIsSet(), dCapCfgTimePar< T >::option, and dCapCfgTimePar< T >::set.

Here is the call graph for this function:

Member Data Documentation

◆ option

template<typename T >
options::single<std::chrono::seconds> dCapCfgTimePar< T >::option
private

Definition at line 90 of file dcapCommon.cpp.

Referenced by dCapCfgTimePar< T >::applySingle().

◆ set

template<typename T >
void(* dCapCfgTimePar< T >::set) (T)
private

Definition at line 91 of file dcapCommon.cpp.

Referenced by dCapCfgTimePar< T >::applySingle().


The documentation for this class was generated from the following file:
options::base::fIsSet
virtual bool fIsSet() const
check if this option was set, regardless of from command line or config file
Definition: Options.h:263
dCapCfgTimePar::option
options::single< std::chrono::seconds > option
Definition: dcapCommon.cpp:90
parPrefix
static const std::string parPrefix("dCap")
dCapCfgTimePar::set
void(* set)(T)
Definition: dcapCommon.cpp:91