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::detail {
8  class AtomBase : public ParameterBase {
9  public:
10  AtomBase(Name const& name,
11  Comment const& comment,
12  par_style const vt,
13  std::function<bool()> maybeUse)
14  : ParameterBase{name, comment, vt, par_type::ATOM, maybeUse}
15  {}
16 
19  {
20  return get_stringified_value();
21  }
22 
23  private:
24  virtual std::string get_stringified_value() const = 0;
25  };
26 }
27 
28 #endif /* fhiclcpp_types_detail_AtomBase_h */
29 
30 // Local variables:
31 // mode: c++
32 // End:
std::string const & name() const
Definition: ParameterBase.h:43
AtomBase(Name const &name, Comment const &comment, par_style const vt, std::function< bool()> maybeUse)
Definition: AtomBase.h:10
std::string string
Definition: nybbler.cc:12
std::string stringified_value() const
Definition: AtomBase.h:18
std::string const & comment() const
Definition: ParameterBase.h:48
void function(int client, int *resource, int parblock, int *test, int p)
virtual std::string get_stringified_value() const =0