LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
PrintAllowedConfiguration.h
Go to the documentation of this file.
1 #ifndef fhiclcpp_types_detail_PrintAllowedConfiguration_h
2 #define fhiclcpp_types_detail_PrintAllowedConfiguration_h
3 
8 
9 #include <stack>
10 #include <string>
11 #include <unordered_set>
12 
13 namespace fhicl::detail {
14 
16  : public ParameterWalker<tt::const_flavor::require_const> {
17  public:
18  PrintAllowedConfiguration(std::ostream& os,
19  bool const showParents = false,
20  std::string const& prefix = std::string(3, ' '),
21  bool const stlf = false);
23 
24  private:
25  std::ostream& buffer_;
28  std::string cachedTopLevelParameter_{};
29  std::stack<MaybeDisplayParent> mps_{};
30  std::unordered_set<std::string> keysWithCommas_{};
31  std::unordered_set<std::string> keysWithEllipses_{};
33 
34  bool before_action(ParameterBase const&) override;
35  void after_action(ParameterBase const&) override;
36 
37  void enter_table(TableBase const&) override;
38  void exit_table(TableBase const&) override;
39 
40  void enter_sequence(SequenceBase const&) override;
41  void exit_sequence(SequenceBase const&) override;
42 
43  void atom(AtomBase const&) override;
44 
45  void delegated_parameter(DelegateBase const&) override;
46 
47  void
49  {
50  if (cachedTopLevelParameter_ == "")
52  }
53 
54  void
56  {
57  if (p.key() == cachedTopLevelParameter_)
59  }
60 
61  bool
63  {
64  return p.key() == cachedTopLevelParameter_;
65  }
66  };
67 }
68 
69 #endif /* fhiclcpp_types_detail_PrintAllowedConfiguration_h */
70 
71 // Local variables:
72 // mode: c++
73 // End:
void exit_sequence(SequenceBase const &) override
PrintAllowedConfiguration(std::ostream &os, bool const showParents=false, std::string const &prefix=std::string(3, ' '), bool const stlf=false)
void after_action(ParameterBase const &) override
void maybeReleaseTopLevelParameter(ParameterBase const &p)
bool before_action(ParameterBase const &) override
std::string const & key() const
Definition: ParameterBase.cc:6
void enter_sequence(SequenceBase const &) override
void delegated_parameter(DelegateBase const &) override
void cacheTopLevelParameter(ParameterBase const &p)
std::unordered_set< std::string > keysWithCommas_
std::unordered_set< std::string > keysWithEllipses_