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

#include "/cvmfs/nova.opensciencegrid.org/externals/fhiclcpp/v4_06_10/source/fhiclcpp/types/OptionalDelegatedParameter.h"

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

Public Member Functions

 OptionalDelegatedParameter (Name &&name)
 
 OptionalDelegatedParameter (Name &&name, Comment &&comment)
 
 OptionalDelegatedParameter (Name &&name, Comment &&comment, std::function< bool()> maybeUse)
 
bool hasValue () const
 
template<typename T >
bool get_if_present (T &t) const
 
std::string key () const
 
std::string name () const
 
std::string comment () const
 
bool has_default () const
 
bool is_optional () const
 
bool is_conditional () const
 
par_type parameter_type () const
 
bool should_use () const
 
void set_value (fhicl::ParameterSet const &ps, bool trimParents)
 
void set_par_style (par_style const vt)
 
void set_key (std::string const &key)
 

Private Member Functions

void do_set_value (fhicl::ParameterSet const &pset, bool const ) override
 

Private Attributes

fhicl::ParameterSet pset_ {}
 

Detailed Description

Definition at line 17 of file OptionalDelegatedParameter.h.

Constructor & Destructor Documentation

fhicl::OptionalDelegatedParameter::OptionalDelegatedParameter ( Name &&  name)
explicit
fhicl::OptionalDelegatedParameter::OptionalDelegatedParameter ( Name &&  name,
Comment &&  comment 
)
explicit
fhicl::OptionalDelegatedParameter::OptionalDelegatedParameter ( Name &&  name,
Comment &&  comment,
std::function< bool()>  maybeUse 
)
explicit

Member Function Documentation

std::string fhicl::detail::ParameterBase::comment ( ) const
inlineinherited
void fhicl::OptionalDelegatedParameter::do_set_value ( fhicl::ParameterSet const &  pset,
bool  const 
)
inlineoverrideprivatevirtual

Implements fhicl::detail::ParameterBase.

Definition at line 44 of file OptionalDelegatedParameter.h.

References pset_.

46  {
47  pset_ = pset;
48  };
template<typename T >
bool fhicl::OptionalDelegatedParameter::get_if_present ( T t) const
inline

Definition at line 35 of file OptionalDelegatedParameter.h.

References fhicl::ParameterSet::get_if_present(), fhicl::detail::ParameterBase::key(), pset_, string, fhicl::detail::strip_first_containing_name(), T, and confusionMatrixTree::t.

Referenced by art::EmptyEvent::makePlugin_().

36  {
37  std::string const& trimmed_key =
39  return pset_.get_if_present<T>(trimmed_key, t);
40  }
std::string strip_first_containing_name(std::string const &key)
bool get_if_present(std::string const &key, T &value) const
Definition: ParameterSet.h:208
double T
Definition: Xdiff_gwt.C:5
std::string key() const
Definition: ParameterBase.h:44
enum BeamMode string
bool fhicl::detail::ParameterBase::has_default ( ) const
inlineinherited
bool fhicl::OptionalDelegatedParameter::hasValue ( ) const
inline

Definition at line 28 of file OptionalDelegatedParameter.h.

References fhicl::ParameterSet::has_key(), fhicl::detail::ParameterBase::key(), pset_, and fhicl::detail::strip_first_containing_name().

29  {
31  }
std::string strip_first_containing_name(std::string const &key)
bool has_key(std::string const &key) const
std::string key() const
Definition: ParameterBase.h:44
bool fhicl::detail::ParameterBase::is_conditional ( ) const
inlineinherited
bool fhicl::detail::ParameterBase::is_optional ( ) const
inlineinherited
std::string fhicl::detail::ParameterBase::key ( ) const
inlineinherited
std::string fhicl::detail::ParameterBase::name ( ) const
inlineinherited
par_type fhicl::detail::ParameterBase::parameter_type ( ) const
inlineinherited
void fhicl::detail::ParameterBase::set_key ( std::string const &  key)
inlineinherited
void fhicl::detail::ParameterBase::set_par_style ( par_style const  vt)
inlineinherited
void fhicl::detail::ParameterBase::set_value ( fhicl::ParameterSet const &  ps,
bool  trimParents 
)
inlineinherited

Definition at line 96 of file ParameterBase.h.

References fhicl::detail::ParameterBase::do_set_value().

97  {
98  do_set_value(ps, trimParents);
99  }
virtual void do_set_value(fhicl::ParameterSet const &, bool trimParents)=0
bool fhicl::detail::ParameterBase::should_use ( ) const
inlineinherited

Definition at line 79 of file ParameterBase.h.

References fhicl::detail::ParameterBase::maybeUse_.

80  {
81  return maybeUse_();
82  }
std::function< bool()> maybeUse_

Member Data Documentation

fhicl::ParameterSet fhicl::OptionalDelegatedParameter::pset_ {}
private

Definition at line 50 of file OptionalDelegatedParameter.h.

Referenced by do_set_value(), get_if_present(), and hasValue().


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