4 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
5 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
6 // Stefan Bund <stefan.bund@fokus.fraunhofer.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 // Definition of non-inline template funPacketRegistry.ons
25 //#include "ParseVec.ih"
30 ///////////////////////////////ct.p////////////////////////////////////////
32 template <class Parser, class SizeParser, class Container>
33 template <class Value>
35 senf::Parse_Vector_wrapper<Parser,SizeParser,Container>::insert(iterator pos,
38 size_type ix(pos.raw()-container_.begin());
40 Parser(container_.begin()+ix).value(t);
43 template <class Parser, class SizeParser, class Container>
44 template <class Value>
46 senf::Parse_Vector_wrapper<Parser,SizeParser,Container>::insert(iterator pos,
50 size_type ix(pos.raw()-container_.begin());
52 typename Container::iterator j (container_.begin()+ix);
53 for (; n; --n, j+=Parser::bytes())
57 template <class Parser, class SizeParser, class Container>
58 template <class InputIterator>
60 senf::Parse_Vector_wrapper<Parser,SizeParser,Container>::insert(iterator pos,
64 /** \fixme This might be horribly inefficient ... we need to
65 specialize for random_access and forward iterators, where we
66 can count the distance */
68 size_type ix(pos.raw()-container_.begin());
70 insert(container_.begin()+ix,*f);
71 ix += Parser::bytes();
75 ///////////////////////////////ct.e////////////////////////////////////////
82 // c-file-style: "senf"
83 // indent-tabs-mode: nil
84 // ispell-local-dictionary: "american"