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);
22 
23  private:
24  std::ostream& buffer_;
28  std::stack<MaybeDisplayParent> mps_{};
29  std::unordered_set<std::string> keysWithCommas_{};
30  std::unordered_set<std::string> keysWithEllipses_{};
32 
33  bool before_action(ParameterBase const&) override;
34  void after_action(ParameterBase const&) override;
35 
36  void enter_table(TableBase const&) override;
37  void exit_table(TableBase const&) override;
38 
39  void enter_sequence(SequenceBase const&) override;
40  void exit_sequence(SequenceBase const&) override;
41 
42  void atom(AtomBase const&) override;
43 
44  void delegated_parameter(DelegateBase const&) override;
45 
46  void
48  {
49  if (cachedTopLevelParameter_ == "")
51  }
52 
53  void
55  {
56  if (p.key() == cachedTopLevelParameter_)
58  }
59 
60  bool
62  {
63  return p.key() == cachedTopLevelParameter_;
64  }
65  };
66 }
67 
68 #endif /* fhiclcpp_types_detail_PrintAllowedConfiguration_h */
69 
70 // Local variables:
71 // mode: c++
72 // 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)
std::string string
Definition: nybbler.cc:12
void after_action(ParameterBase const &) override
void maybeReleaseTopLevelParameter(ParameterBase const &p)
bool before_action(ParameterBase const &) override
p
Definition: test.py:223
void enter_sequence(SequenceBase const &) override
std::string const & key() const
Definition: ParameterBase.h:38
void delegated_parameter(DelegateBase const &) override
void cacheTopLevelParameter(ParameterBase const &p)
std::unordered_set< std::string > keysWithCommas_
std::unordered_set< std::string > keysWithEllipses_