Try out more dynamic action dispatch.
Rather than a switch case, the final version will probably use something like std::map<value_tag, boost::function<...> > to dispatch the actions.
std::map<value_tag, boost::function<...> >