17 #ifndef HH_SENF_Packets_VariantParser_ 18 #define HH_SENF_Packets_VariantParser_ 1 20 #ifndef HH_SENF_Packets_Packets_ 21 #error "Don't include 'VariantParser.hh' directly, include 'Packets.hh'" 25 #include <boost/mpl/vector.hpp> 26 #include <boost/mpl/at.hpp> 27 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> 28 #include <boost/preprocessor/repetition/enum_params.hpp> 29 #include <boost/preprocessor/seq/for_each.hpp> 37 # ifndef SENF_LIMIT_PARSE_VARIANT 42 # define SENF_LIMIT_PARSE_VARIANT 6 70 template <
class AuxPolicy,
class Parsers>
74 typedef Parsers parsers;
87 typename boost::mpl::at<parsers, boost::mpl::int_<0> >::type>::value
88 + AuxPolicy::aux_bytes;
100 template <
unsigned N>
101 typename boost::mpl::at< parsers, boost::mpl::int_<N> >::type
get()
const;
109 template <
unsigned N>
236 # define SENF_PARSER_VARIANT(name, chooser, types) \ 237 SENF_PARSER_VARIANT_I(public, name, chooser, types) 245 # define SENF_PARSER_PRIVATE_VARIANT(name, chooser, types) \ 246 SENF_PARSER_VARIANT_I(protected, name, chooser, types) 251 #if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_VariantParser_i_) 252 #define HH_SENF_Packets_VariantParser_i_
unsigned variant() const
Get current variant.
PacketParser public header.
Return number of bytes to allocate to new object of given type.
VariantParser(data_iterator i, state_type s)
Packet data STL-sequence view.
data_iterator i() const
Return beginning of data to parse.
detail::packet::size_type size_type
Unsigned integral type.
detail::packet::iterator data_iterator
Raw data iterator type.