prefix_
senf::detail::ListBParser_Policy<ElementParser,AuxPolicy>::container_policy::
container_policy(parser_policy const & p)
- : AuxPolicy (p)
+ : AuxPolicy::WrapperPolicy (p)
{
parser_type selfp (parser_type::get(p));
size_type totalsz (selfp.bytes());
data_iterator const e (selfp.i(totalsz));
- data_iterator i (AuxPolicy::adjust(selfp.i(), selfp.state()));
+ data_iterator i (AuxPolicy::WrapperPolicy::adjust(selfp.i(), selfp.state()));
n_ = 0;
while (i!=e) {
ElementParser p (i,selfp.state());
state_type s)
const
{
- return AuxPolicy::aux(i,s) + AuxPolicy::aux_bytes;
+ return AuxPolicy::WrapperPolicy::aux(i,s) + AuxPolicy::aux_bytes;
}
template <class ElementParser, class AuxPolicy>
{
n_ = 0;
container_size_ = s->size();
- AuxPolicy::aux(0,i,s);
+ AuxPolicy::WrapperPolicy::aux(0,i,s);
}
template <class ElementParser, class AuxPolicy>
erase(container_type & c, data_iterator p)
{
size_type b (senf::bytes(ElementParser(p,c.state())));
- AuxPolicy::aux( AuxPolicy::aux(c.i(), c.state())-b, c.i(), c.state());
+ AuxPolicy::WrapperPolicy::aux(
+ AuxPolicy::WrapperPolicy::aux(c.i(), c.state())-b, c.i(), c.state());
--n_;
// The container will be reduced by b bytes directly after this call
container_size_ = c.data().size()-b;
insert(container_type & c, data_iterator p)
{
size_type b (senf::bytes(ElementParser(p,c.state())));
- AuxPolicy::aux( AuxPolicy::aux(c.i(), c.state())+b, c.i(), c.state());
+ AuxPolicy::WrapperPolicy::aux(
+ AuxPolicy::WrapperPolicy::aux(c.i(), c.state())+b, c.i(), c.state());
++n_;
container_size_ = c.data().size();
}
if (container_size_ == c.data().size())
return;
#if 1
- data_iterator i (AuxPolicy::adjust(c.i(), c.state()));
+ data_iterator i (AuxPolicy::WrapperPolicy::adjust(c.i(), c.state()));
data_iterator j (i);
for (size_type n (n_); n; --n, std::advance(j,senf::bytes(ElementParser(j,c.state())))) ;
aux( std::distance(i,j), c.i(), c.state() );
setBegin(container_type const & c, iterator_data & d)
const
{
- return AuxPolicy::adjust(c.i(), c.state());
+ return AuxPolicy::WrapperPolicy::adjust(c.i(), c.state());
}
template <class ElementParser, class AuxPolicy>
setEnd(container_type const & c, iterator_data & d)
const
{
- return boost::next(AuxPolicy::adjust(c.i(), c.state()),aux(c.i(),c.state()));
+ return boost::next(AuxPolicy::WrapperPolicy::adjust(c.i(), c.state()),aux(c.i(),c.state()));
}
template <class ElementParser, class AuxPolicy>
struct ListNParser_Policy
: public AuxPolicy
{
+ typedef ListNParser_Policy<
+ ElementParser, typename AuxPolicy::ParserPolicy> parser_policy;
+ typedef ListNParser_Policy<
+ ElementParser, typename AuxPolicy::WrapperPolicy> container_policy;
typedef PacketParserBase::data_iterator data_iterator;
typedef PacketParserBase::state_type state_type;
typedef PacketParserBase::size_type size_type;
typedef ElementParser element_type;
- typedef ListParser< ListNParser_Policy > parser_type;
- typedef ListParser_Container< ListNParser_Policy > container_type;
+ typedef ListParser<parser_policy> parser_type;
+ typedef ListParser_Container<container_policy> container_type;
static const size_type init_bytes = AuxPolicy::aux_bytes;
ListNParser_Policy();
template <class Arg> ListNParser_Policy(Arg const & aux);
+ ListNParser_Policy(parser_policy const & policy);
size_type bytes (data_iterator i, state_type s) const;
size_type size (data_iterator i, state_type s) const;