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 satcom::pkf::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 satcom::pkf::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 satcom::pkf::Parse_Vector_wrapper<Parser,SizeParser,Container>::insert(iterator pos,
64 // FIXME: This is HORRIBLY inefficient ... we need to specialize
65 // for random_aPacketRegistry.ess and forward iterators, where we can count the distance
67 size_type ix(pos.raw()-container_.begin());
69 insert(container_.begin()+ix,*f);
70 ix += Parser::bytes();
74 ///////////////////////////////ct.e////////////////////////////////////////
80 // c-file-style: "satcom"