# // SENF_PARSER_I_FIELD_OFS_*
#
# define SENF_PARSER_I_FIELD_OFS_var(name, type, access) \
+ protected: \
size_type BOOST_PP_CAT(name,_offset)() const { \
return field_offset_(static_cast<senf::mpl::rv<BOOST_PP_CAT(name,_index)-1>*>(0)); \
} \
static size_type const BOOST_PP_CAT(name, _init_bytes) = \
- SENF_MPL_SLOT_GET(init_bytes);
+ SENF_MPL_SLOT_GET(init_bytes); \
+ private:
#
# define SENF_PARSER_I_FIELD_OFS_fix(name, type, access) \
+ protected: \
static size_type const BOOST_PP_CAT(name, _offset) = \
- SENF_MPL_SLOT_GET(offset);
+ SENF_MPL_SLOT_GET(offset); \
+ private:
#
# ////////////////////////////////////////
# // SENF_PARSER_I_ADVANCE_OFS_*
return BOOST_PP_CAT(name, _next_offset)(); \
} \
SENF_MPL_SLOT_SET(init_bytes, BOOST_PP_CAT(name,_next_init_bytes)); \
+ protected: \
static size_type const BOOST_PP_CAT(name, _group) = SENF_MPL_SLOT_GET(group) + isvar; \
+ private: \
SENF_MPL_SLOT_SET(group, BOOST_PP_CAT(name, _group)); \
access:
#
# // SENF_PARSER_I_FIELD_VAL_*
#
# define SENF_PARSER_I_FIELD_VAL_rw(name, type, access) \
- private: \
+ protected: \
BOOST_PP_CAT(name, _t) BOOST_PP_CAT(name, _)() const { \
return parse<type>( SENF_PARSER_OFFSET(name) ); \
} \
}
#
# define SENF_PARSER_I_FIELD_VAL_ro(name, type, access) \
- private: \
+ protected: \
BOOST_PP_CAT(name, _t) BOOST_PP_CAT(name, _)() const { \
return parse<type>( SENF_PARSER_OFFSET(name) ); \
} \
template <class T> T BOOST_PP_CAT(name, _dispatch)(boost::true_type) const \
{ return parse<T>( SENF_PARSER_OFFSET(name) ); } \
template <class T> T BOOST_PP_CAT(name, _dispatch)(boost::false_type) const \
- { return parse<T>( BOOST_PP_CAT(aux,_)(), SENF_PARSER_OFFSET(name) ); } \
+ { return parse<T>( BOOST_PP_CAT(aux,_)(), SENF_PARSER_OFFSET(name) ); } \
BOOST_PP_CAT(name, _t) BOOST_PP_CAT(name, _)() const \
{ return BOOST_PP_CAT(name, _dispatch) <BOOST_PP_CAT(name, _t)>( \
boost::integral_constant<bool, BOOST_PP_CAT(name, _aux_fixed)>()); } \