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:
const XML_Char * name
Definition: expat.h:151
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
bool has_key(std::string const &key) const
double T
Definition: Xdiff_gwt.C:5
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
enum BeamMode string