X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseListS.hh;h=63d3ff1c86e9b9fcb3acc261e3771544ca1d7d2a;hb=9a988902090d28007578e93bffd809f6bd913155;hp=87b708253adf3e88cf1982aebbff6e7c9a4a361b;hpb=494e197e719a49fba726d90f668c2d96c02c744b;p=senf.git diff --git a/Packets/ParseListS.hh b/Packets/ParseListS.hh index 87b7082..63d3ff1 100644 --- a/Packets/ParseListS.hh +++ b/Packets/ParseListS.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -26,7 +26,7 @@ transition function. See ParseListS.hh for more. We should write a baseclass for sentinels which has no \c check() - member, en empty \c next() member and \c void as the state + member, an empty \c next() member and \c void as the state type. This simplifies writing simple sentinels. The parse_listS iterator will have to pass the state in addition @@ -35,8 +35,8 @@ element and a (non-const) reference to the state which it may update. The Parse_ListS constructor must take an arbitrary number of additional arguments which are forwarded to the state - initialization. - + initialization. + This structure makes it simple to optimize away the overhead if the state type is void. If we would always instantiate the sentinel, this will always take up space. @@ -66,8 +66,8 @@ namespace senf { template class Parse_ListS_wrapper; - namespace impl { - template class Parse_ListS_iterator; + namespace impl { + template class Parse_ListS_iterator; } template @@ -76,13 +76,13 @@ namespace senf { /////////////////////////////////////////////////////////////////////////// // Parser interface - template + template struct rebind { typedef Parse_ListS parser; }; typedef Iterator byte_iterator; - + Parse_ListS(); Parse_ListS(Iterator const & i); - + unsigned bytes() const; bool check(Iterator const & e) const; void init() const; @@ -113,7 +113,7 @@ namespace senf { }; /** \brief - + Holds a reference to the container ! */ template @@ -162,20 +162,20 @@ namespace senf { ///\name Mutators ///@{ - template void insert(iterator pos, Value const & t); - template void insert(iterator pos, size_type n, Value const & t); - template void insert(iterator pos, InputIterator f, InputIterator l); - - void erase(iterator pos, size_type n=1); - void erase(iterator f, iterator l); - void clear(); + template void insert(iterator pos, Value const & t); + template void insert(iterator pos, size_type n, Value const & t); + template void insert(iterator pos, InputIterator f, InputIterator l); + + void erase(iterator pos, size_type n=1); + void erase(iterator f, iterator l); + void clear(); ///@} protected: private: - + size_type i_; Container & container_; }; @@ -191,5 +191,8 @@ namespace senf { // Local Variables: // mode: c++ +// fill-column: 100 // c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: