Public Member Functions | Private Member Functions | Private Attributes | List of all members
fhicl::DelegatedParameter Class Referencefinal

#include <DelegatedParameter.h>

Inheritance diagram for fhicl::DelegatedParameter:
fhicl::detail::DelegateBase fhicl::detail::RegisterIfTableMember fhicl::detail::ParameterBase

Public Member Functions

 DelegatedParameter (Name &&name)
 
 DelegatedParameter (Name &&name, Comment &&comment)
 
 DelegatedParameter (Name &&name, Comment &&comment, std::function< bool()> maybeUse)
 
template<typename T >
auto get () const
 
- Public Member Functions inherited from fhicl::detail::DelegateBase
 DelegateBase (Name const &name, Comment const &comment, par_style const vt, std::function< bool()> maybeUse)
 
- Public Member Functions inherited from fhicl::detail::ParameterBase
std::string const & key () const
 
std::string const & name () const
 
std::string const & comment () const
 
bool has_default () const
 
bool is_optional () const
 
bool is_conditional () const
 
par_type parameter_type () const
 
bool should_use () const
 
 ParameterBase (Name const &name, Comment const &comment, par_style const vt, par_type const type, std::function< bool()> maybeUse=AlwaysUse())
 
virtual ~ParameterBase ()=default
 
void set_value (fhicl::ParameterSet const &ps)
 
bool preset_value (fhicl::ParameterSet const &ps)
 
void set_par_style (par_style const vt)
 

Private Member Functions

void do_set_value (fhicl::ParameterSet const &pset) override
 
- Private Member Functions inherited from fhicl::detail::RegisterIfTableMember
 RegisterIfTableMember (ParameterBase *pb)
 

Private Attributes

fhicl::ParameterSet pset_ {}
 

Detailed Description

Definition at line 15 of file DelegatedParameter.h.

Constructor & Destructor Documentation

fhicl::DelegatedParameter::DelegatedParameter ( Name &&  name)
explicit

Definition at line 7 of file DelegatedParameter.cc.

9  {}
std::string const & name() const
Definition: ParameterBase.h:43
def move(depos, offset)
Definition: depos.py:107
#define Comment
fhicl::DelegatedParameter::DelegatedParameter ( Name &&  name,
Comment &&  comment 
)
explicit

Definition at line 11 of file DelegatedParameter.cc.

16  , RegisterIfTableMember{this}
17  {
19  }
DelegateBase(Name const &name, Comment const &comment, par_style const vt, std::function< bool()> maybeUse)
Definition: DelegateBase.h:10
std::string const & name() const
Definition: ParameterBase.h:43
std::function< bool()> AlwaysUse()
def move(depos, offset)
Definition: depos.py:107
std::string const & comment() const
Definition: ParameterBase.h:48
fhicl::DelegatedParameter::DelegatedParameter ( Name &&  name,
Comment &&  comment,
std::function< bool()>  maybeUse 
)
explicit

Definition at line 21 of file DelegatedParameter.cc.

27  maybeUse}
28  , RegisterIfTableMember{this}
29  {
31  }
DelegateBase(Name const &name, Comment const &comment, par_style const vt, std::function< bool()> maybeUse)
Definition: DelegateBase.h:10
std::string const & name() const
Definition: ParameterBase.h:43
def move(depos, offset)
Definition: depos.py:107
std::string const & comment() const
Definition: ParameterBase.h:48

Member Function Documentation

void fhicl::DelegatedParameter::do_set_value ( fhicl::ParameterSet const &  pset)
inlineoverrideprivatevirtual

Implements fhicl::detail::ParameterBase.

Definition at line 37 of file DelegatedParameter.h.

38  {
39  pset_ = pset;
40  };
fhicl::ParameterSet pset_
template<typename T >
auto fhicl::DelegatedParameter::get ( ) const
inline

Definition at line 28 of file DelegatedParameter.h.

29  {
30  auto const trimmed_key =
32  return pset_.get<T>(trimmed_key);
33  }
std::string strip_first_containing_name(std::string const &key)
T get(std::string const &key) const
Definition: ParameterSet.h:271
std::string const & key() const
Definition: ParameterBase.h:38
fhicl::ParameterSet pset_

Member Data Documentation

fhicl::ParameterSet fhicl::DelegatedParameter::pset_ {}
private

Definition at line 42 of file DelegatedParameter.h.


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