1 #ifndef fhiclcpp_types_detail_ParameterWalker_h 2 #define fhiclcpp_types_detail_ParameterWalker_h 72 #include "cetlib/container_algorithms.h" 73 #include "cetlib_except/demangle.h" 82 template <tt::const_flavor C>
160 template <tt::const_flavor C>
173 maybe_const_table& t =
dynamic_cast<maybe_const_table&
>(p);
175 cet::for_all(t.members(), [&tw](
auto m) { tw.walk_over(*m); });
179 maybe_const_sequence& s =
dynamic_cast<maybe_const_sequence&
>(p);
185 maybe_const_atom& a =
dynamic_cast<maybe_const_atom&
>(p);
189 maybe_const_delegate& dp =
dynamic_cast<maybe_const_delegate&
>(p);
bool is_atom(par_type const pt)
void do_delegated_parameter(tt::maybe_const_t< DelegateBase, C > &dp)
virtual void exit_sequence(tt::maybe_const_t< SequenceBase, C > &)
ParameterWalker()=default
void walk_over(tt::maybe_const_t< ParameterBase, C > &)
void do_after_action(tt::maybe_const_t< ParameterBase, C > &p)
virtual void after_action(tt::maybe_const_t< ParameterBase, C > &)
virtual void enter_table(tt::maybe_const_t< TableBase, C > &)=0
virtual void atom(tt::maybe_const_t< AtomBase, C > &)=0
virtual ~ParameterWalker()=default
void do_enter_sequence(tt::maybe_const_t< SequenceBase, C > &s)
virtual void exit_table(tt::maybe_const_t< TableBase, C > &)
void do_enter_table(tt::maybe_const_t< TableBase, C > &t)
void do_exit_sequence(tt::maybe_const_t< SequenceBase, C > &s)
typename maybe_const< T, C >::type maybe_const_t
virtual void delegated_parameter(tt::maybe_const_t< DelegateBase, C > &)=0
bool is_table(std::any const &val)
bool do_before_action(tt::maybe_const_t< ParameterBase, C > &p)
void do_atom(tt::maybe_const_t< AtomBase, C > &a)
void do_exit_table(tt::maybe_const_t< TableBase, C > &t)
virtual bool before_action(tt::maybe_const_t< ParameterBase, C > &)
bool is_sequence(std::any const &val)
virtual void enter_sequence(tt::maybe_const_t< SequenceBase, C > &)=0