LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 
4 #include "cetlib/exempt_ptr.h"
10 
11 #include <stack>
12 #include <string>
13 #include <unordered_set>
14 
15 namespace fhicl {
16  namespace detail {
17 
19  : public ParameterWalker<tt::const_flavor::require_const> {
20  public:
21  PrintAllowedConfiguration(std::ostream& os,
22  bool const showParents = false,
23  std::string const& prefix = std::string(3, ' '),
24  bool const stlf = false);
25 
26  private:
27  std::ostream& buffer_;
30  std::string cachedTopLevelParameter_{};
31  std::stack<MaybeDisplayParent> mps_{};
32  std::unordered_set<std::string> keysWithCommas_{};
33  std::unordered_set<std::string> keysWithEllipses_{};
35 
36  bool before_action(ParameterBase const&) override;
37  void after_action(ParameterBase const&) override;
38 
39  void enter_table(TableBase const&) override;
40  void exit_table(TableBase const&) override;
41 
42  void enter_sequence(SequenceBase const&) override;
43  void exit_sequence(SequenceBase const&) override;
44 
45  void atom(AtomBase const&) override;
46 
47  void delegated_parameter(DelegateBase const&) override;
48 
49  void
51  {
52  if (cachedTopLevelParameter_ == "")
54  }
55 
56  void
58  {
59  if (p.key() == cachedTopLevelParameter_)
61  }
62 
63  bool
65  {
66  return p.key() == cachedTopLevelParameter_;
67  }
68  };
69  }
70 }
71 
72 #endif /* fhiclcpp_types_detail_PrintAllowedConfiguration_h */
73 
74 // Local variables:
75 // mode: c++
76 // 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
parameter set interface
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_
std::string key() const
Definition: ParameterBase.h:44