X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseArray.hh;h=1e98a71d5ca8dc058dc0c4d0026b155c9a57da11;hb=ef0a3583fc76292d631de6a4a5cad4a432351ac8;hp=f4a0d41102898fa907dc08dbd8df57c8851c67e5;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Packets/ParseArray.hh b/Packets/ParseArray.hh index f4a0d41..1e98a71 100644 --- a/Packets/ParseArray.hh +++ b/Packets/ParseArray.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -24,59 +24,42 @@ #define HH_ParseArray_ 1 // Custom includes -#include // for std::pair -#include "ParserBase.hh" +#include "PacketParser.hh" //#include "ParseArray.mpp" ///////////////////////////////hh.p//////////////////////////////////////// -namespace satcom { -namespace pkf { - - namespace impl { template class Parse_Array_iterator; } +namespace senf { + + namespace detail { template class Parse_Array_iterator; } /* Parse_Array has the external interface of a container class */ - template - struct Parse_Array : public ParserBase + template + struct Parse_Array : public PacketParserBase { - /////////////////////////////////////////////////////////////////////////// - // Parser interface + Parse_Array(data_iterator i, state_type s); - template - struct rebind { typedef Parse_Array parser; }; - typedef Iterator byte_iterator; + static size_type const fixed_bytes = elements*ElementParser::fixed_bytes; - Parse_Array(); - explicit Parse_Array(Iterator const & i); - - static unsigned bytes(); - bool check(Iterator const & e) const; void init() const; /////////////////////////////////////////////////////////////////////////// // Container interface - typedef typename Parser::template rebind::parser value_type; - typedef impl::Parse_Array_iterator iterator; - typedef unsigned size_type; - typedef int difference_type; - typedef std::pair range_type; + typedef ElementParser value_type; + typedef detail::Parse_Array_iterator iterator; + typedef iterator const_iterator; static size_type size(); iterator begin() const; iterator end() const; - range_type range() const; - iterator value() const; value_type operator[](difference_type i) const; - - template - Parse_Array const & operator= (InputIterator const & i); }; -}} +} ///////////////////////////////hh.e//////////////////////////////////////// //#include "ParseArray.cci" @@ -87,5 +70,10 @@ namespace pkf { // 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" +// comment-column: 40 // End: