X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseArray.hh;h=f0669b3e20cb7c7006f7329fbabdb7d921cdc246;hb=b371e9c8020d1c30d7f844819714a81db7709912;hp=a88d984ba671b3284a4cac4cca05b12cf96c4a97;hpb=31d85cd6b8e03c5ecc924ca8892906be1bab702f;p=senf.git diff --git a/Packets/ParseArray.hh b/Packets/ParseArray.hh index a88d984..f0669b3 100644 --- a/Packets/ParseArray.hh +++ b/Packets/ParseArray.hh @@ -24,61 +24,47 @@ #define HH_ParseArray_ 1 // Custom includes -#include // for std::pair -#include "ParserBase.hh" +#include "PacketParser.hh" //#include "ParseArray.mpp" ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { - - namespace impl { template class Parse_Array_iterator; } + 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 - - template - struct rebind { typedef Parse_Array parser; }; - typedef Iterator byte_iterator; + Parse_Array(data_iterator i, state_type s); - Parse_Array(); - explicit Parse_Array(Iterator const & i); + static size_type const fixed_bytes = elements*ElementParser::fixed_bytes; - 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//////////////////////////////////////// +#endif +#if !defined(SENF_PACKETS_DECL_ONLY) && !defined(HH_ParseArray_i_) +#define HH_ParseArray_i_ //#include "ParseArray.cci" //#include "ParseArray.ct" #include "ParseArray.cti" @@ -92,4 +78,5 @@ namespace senf { // indent-tabs-mode: nil // ispell-local-dictionary: "american" // compile-command: "scons -u test" +// comment-column: 40 // End: