LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
OptionalDelegatedParameter.h
Go to the documentation of this file.
1 #ifndef fhiclcpp_types_OptionalDelegatedParameter_h
2 #define fhiclcpp_types_OptionalDelegatedParameter_h
3 
6 #include "fhiclcpp/types/Name.h"
11 
12 #include <iostream>
13 
14 namespace fhicl {
15 
16  //========================================================
18  : public detail::DelegateBase,
20  public:
24  Comment&& comment,
25  std::function<bool()> maybeUse);
26 
27  bool
28  hasValue() const
29  {
31  }
32 
33  template <typename T>
34  bool
35  get_if_present(T& t) const
36  {
37  std::string const& trimmed_key =
39  return pset_.get_if_present<T>(trimmed_key, t);
40  }
41 
42  private:
43  void
45  bool const /*trimParents*/) override
46  {
47  pset_ = pset;
48  };
49 
51  };
52 }
53 
54 #endif /* fhiclcpp_types_OptionalDelegatedParameter_h */
55 
56 // Local variables:
57 // mode: c++
58 // End:
std::string strip_first_containing_name(std::string const &key)
parameter set interface
bool get_if_present(std::string const &key, T &value) const
Definition: ParameterSet.h:208
bool has_key(std::string const &key) const
std::string name() const
Definition: ParameterBase.h:49
std::string key() const
Definition: ParameterBase.h:44
void do_set_value(fhicl::ParameterSet const &pset, bool const ) override
std::string comment() const
Definition: ParameterBase.h:54