1 #ifndef fhiclcpp_types_detail_ParameterWalker_h 2 #define fhiclcpp_types_detail_ParameterWalker_h 73 #include "cetlib/container_algorithms.h" 74 #include "cetlib_except/demangle.h" 84 template <tt::const_flavor C>
162 template <tt::const_flavor C>
175 maybe_const_table& t =
dynamic_cast<maybe_const_table&
>(p);
177 cet::for_all(t.members(), [&tw](
auto m) { tw.walk_over(*m); });
181 maybe_const_sequence&
s =
dynamic_cast<maybe_const_sequence&
>(p);
187 maybe_const_atom& a =
dynamic_cast<maybe_const_atom&
>(p);
191 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
bool is_sequence(boost::any const &val)
bool is_table(boost::any const &val)
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 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 > &)
virtual void enter_sequence(tt::maybe_const_t< SequenceBase, C > &)=0