X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseListS.ct;h=1f1dabbcc2ea30591c0ee5da51ffb6bf8e4dfc73;hb=31d85cd6b8e03c5ecc924ca8892906be1bab702f;hp=7e65fa968e8136800bf5d146020eafb7202c5ec5;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Packets/ParseListS.ct b/Packets/ParseListS.ct index 7e65fa9..1f1dabb 100644 --- a/Packets/ParseListS.ct +++ b/Packets/ParseListS.ct @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -31,7 +31,7 @@ ///////////////////////////////ct.p//////////////////////////////////////// template -prefix_ unsigned satcom::pkf::Parse_ListS::bytes() +prefix_ unsigned senf::Parse_ListS::bytes() const { iterator i (begin()); @@ -46,7 +46,7 @@ prefix_ unsigned satcom::pkf::Parse_ListS::byt template prefix_ bool -satcom::pkf::Parse_ListS::check(Iterator const & e) +senf::Parse_ListS::check(Iterator const & e) const { byte_iterator i (this->i()); @@ -61,7 +61,7 @@ satcom::pkf::Parse_ListS::check(Iterator const } template -prefix_ void satcom::pkf::Parse_ListS::init() +prefix_ void senf::Parse_ListS::init() const { iterator i (begin()); @@ -74,15 +74,14 @@ prefix_ void satcom::pkf::Parse_ListS::init() } /////////////////////////////////////////////////////////////////////////// -// satcom::pkf::Parse_ListS_wrapper +// senf::Parse_ListS_wrapper template template prefix_ void -satcom::pkf::Parse_ListS_wrapper::insert(iterator pos, - Value const & t) +senf::Parse_ListS_wrapper::insert(iterator pos, + Value const & t) { - // FIXME: What, if pos == end() / default constructed iterator ? size_type ix (pos.raw()-container_.begin()); container_.insert(pos.raw(),t.bytes(),0); Parser(container_.begin()+ix).value(t); @@ -91,8 +90,8 @@ satcom::pkf::Parse_ListS_wrapper::insert(iterator pos template template prefix_ void -satcom::pkf::Parse_ListS_wrapper::insert(iterator pos, size_type n, - Value const & t) +senf::Parse_ListS_wrapper::insert(iterator pos, size_type n, + Value const & t) { size_type ix (pos.raw()-container_.begin()); container_.insert(pos.raw(),n*t.bytes(),0); @@ -104,10 +103,11 @@ satcom::pkf::Parse_ListS_wrapper::insert(iterator pos template template prefix_ void -satcom::pkf::Parse_ListS_wrapper::insert(iterator pos, - InputIterator f, - InputIterator l) +senf::Parse_ListS_wrapper::insert(iterator pos, + InputIterator f, + InputIterator l) { + /** \todo Optimize this for random-access and multi-pass iterators */ for (;f!=l;++f,++pos) insert(pos,*f); } @@ -117,5 +117,9 @@ satcom::pkf::Parse_ListS_wrapper::insert(iterator pos // Local Variables: // mode: c++ -// c-file-style: "satcom" +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" // End: