ewmscp  ..
Public Member Functions | Private Attributes | List of all members
davixCfgPar< struct timespec * > Class Reference

#include <davixCommon.h>

Collaboration diagram for davixCfgPar< struct timespec * >:
[legend]

Public Member Functions

 davixCfgPar (const std::string &parPrefix, const std::string &optName, const std::string &description, void(Davix::RequestParams::*setter)(struct timespec *))
 
void applySingle (Davix::RequestParams &params)
 

Private Attributes

options::single< std::chrono::nanoseconds > option
 
void(Davix::RequestParams::* set )(struct timespec *)
 
struct timespec spec
 

Detailed Description

Definition at line 93 of file davixCommon.h.

Constructor & Destructor Documentation

◆ davixCfgPar()

davixCfgPar< struct timespec * >::davixCfgPar ( const std::string &  parPrefix,
const std::string &  optName,
const std::string &  description,
void(Davix::RequestParams::*)(struct timespec *)  setter 
)
inline

Definition at line 98 of file davixCommon.h.

101  :
102  option('\0', parPrefix + optName, description),
103  set(setter) {
104  }

Member Function Documentation

◆ applySingle()

void davixCfgPar< struct timespec * >::applySingle ( Davix::RequestParams &  params)
inline

Definition at line 105 of file davixCommon.h.

105  {
106  if (option.fIsSet()) {
107  spec.tv_sec = std::chrono::duration_cast<std::chrono::seconds>(option).count();
108  spec.tv_nsec = option.count() % 1000000000;
109  (params.*set)(&spec);
110  }
111  }

References options::base::fIsSet().

Referenced by davixConfigObject::apply().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ option

options::single<std::chrono::nanoseconds> davixCfgPar< struct timespec * >::option
private

Definition at line 94 of file davixCommon.h.

◆ set

void(Davix::RequestParams::* davixCfgPar< struct timespec * >::set) (struct timespec *)
private

Definition at line 95 of file davixCommon.h.

◆ spec

struct timespec davixCfgPar< struct timespec * >::spec
private

Definition at line 96 of file davixCommon.h.


The documentation for this class was generated from the following file:
davixCfgPar< struct timespec * >::spec
struct timespec spec
Definition: davixCommon.h:96
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
davixCfgPar< struct timespec * >::set
void(Davix::RequestParams::* set)(struct timespec *)
Definition: davixCommon.h:95
parPrefix
static const std::string parPrefix("dCap")
davixCfgPar< struct timespec * >::option
options::single< std::chrono::nanoseconds > option
Definition: davixCommon.h:94