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

Public Member Functions

 dCapCfg2Par (const std::string &opt1Name, const std::string &description1, const std::string &opt2Name, const std::string &description2, void(*setter)(T, U), std::initializer_list< dCapConfigParameter * > forbid={})
 
void applySingle () override
 
- Public Member Functions inherited from dCapConfigParameter
virtual void fForbid (options::base &)
 
 dCapConfigParameter ()
 

Private Attributes

options::single< T > option1
 
options::single< U > option2
 
void(* set )(T, U)
 

Additional Inherited Members

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

Detailed Description

template<class T, class U>
class dCapCfg2Par< T, U >

Definition at line 62 of file dcapCommon.cpp.

Constructor & Destructor Documentation

◆ dCapCfg2Par()

template<class T , class U >
dCapCfg2Par< T, U >::dCapCfg2Par ( const std::string &  opt1Name,
const std::string &  description1,
const std::string &  opt2Name,
const std::string &  description2,
void(*)(T, U)  setter,
std::initializer_list< dCapConfigParameter * >  forbid = {} 
)
inline

Definition at line 67 of file dcapCommon.cpp.

72  {}):
73  option1('\0', parPrefix + opt1Name, description1),
74  option2('\0', parPrefix + opt2Name, description2),
75  set(setter) {
76  option1.fRequire(&option2);
78  for (auto& other : forbid) {
79  other->fForbid(option1);
80  other->fForbid(option2);
81  }
82  }

Member Function Documentation

◆ applySingle()

template<class T , class U >
void dCapCfg2Par< T, U >::applySingle ( )
inlineoverridevirtual

Implements dCapConfigParameter.

Definition at line 83 of file dcapCommon.cpp.

83  {
84  if (option1.fIsSet()) {
86  }
87  }

References dCapCfg2Par< T, U >::option1, dCapCfg2Par< T, U >::option2, and dCapCfg2Par< T, U >::set.

Member Data Documentation

◆ option1

template<class T , class U >
options::single<T> dCapCfg2Par< T, U >::option1
private

Definition at line 63 of file dcapCommon.cpp.

Referenced by dCapCfg2Par< T, U >::applySingle().

◆ option2

template<class T , class U >
options::single<U> dCapCfg2Par< T, U >::option2
private

Definition at line 64 of file dcapCommon.cpp.

Referenced by dCapCfg2Par< T, U >::applySingle().

◆ set

template<class T , class U >
void(* dCapCfg2Par< T, U >::set) (T, U)
private

Definition at line 65 of file dcapCommon.cpp.

Referenced by dCapCfg2Par< T, U >::applySingle().


The documentation for this class was generated from the following file:
dCapCfg2Par::option2
options::single< U > option2
Definition: dcapCommon.cpp:64
dCapCfg2Par::set
void(* set)(T, U)
Definition: dcapCommon.cpp:65
options::base::fRequire
virtual void fRequire(const base *aOtherOption)
require aOtherOption when this option is set
Definition: Options.cpp:611
dCapCfg2Par::option1
options::single< T > option1
Definition: dcapCommon.cpp:63
parPrefix
static const std::string parPrefix("dCap")