LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
AtomBase.h
Go to the documentation of this file.
1 #ifndef fhiclcpp_types_detail_AtomBase_h
2 #define fhiclcpp_types_detail_AtomBase_h
3 
6 
7 namespace fhicl {
8 
9  class ParameterSet;
10 
11  namespace detail {
12 
13  //========================================================
14  class AtomBase : public ParameterBase {
15  public:
16  AtomBase(Name const& name,
17  Comment const& comment,
18  par_style const vt,
19  std::function<bool()> maybeUse)
20  : ParameterBase{name, comment, vt, par_type::ATOM, maybeUse}
21  {}
22 
23  std::string
25  {
26  return get_stringified_value();
27  }
28 
29  private:
30  virtual std::string get_stringified_value() const = 0;
31  };
32  }
33 }
34 
35 #endif /* fhiclcpp_types_detail_AtomBase_h */
36 
37 // Local variables:
38 // mode: c++
39 // End:
AtomBase(Name const &name, Comment const &comment, par_style const vt, std::function< bool()> maybeUse)
Definition: AtomBase.h:16
std::string stringified_value() const
Definition: AtomBase.h:24
parameter set interface
std::string name() const
Definition: ParameterBase.h:49
std::string comment() const
Definition: ParameterBase.h:54
virtual std::string get_stringified_value() const =0