2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief ListBParser non-inline template implementation */
17 #include "ListBParser.ih"
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::detail::ListBParser_Policy<ElementParser,AuxPolicy>::container_policy
27 template <class ElementParser, class AuxPolicy>
29 senf::detail::ListBParser_Policy<ElementParser,AuxPolicy>::container_policy::
30 container_policy(parser_policy const & p)
31 : AuxPolicy::WrapperPolicy (p)
33 parser_type selfp (parser_type::get(p));
34 size_type totalsz (selfp.bytes());
35 data_iterator const e (selfp.i(totalsz));
36 data_iterator i (AuxPolicy::WrapperPolicy::adjust(selfp.i(), selfp.state()));
39 ElementParser p (i,selfp.state());
40 size_type sz (senf::bytes(p));
41 SENF_ASSERT(sz, "Broken element parser: reports size of 0 bytes");
45 container_size_ = selfp.data().size();
48 //-/////////////////////////////////////////////////////////////////////////////////////////////////
56 // c-file-style: "senf"
57 // indent-tabs-mode: nil
58 // ispell-local-dictionary: "american"
59 // compile-command: "scons -u test"