X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketParser.hh;h=c85ff2ff99b9398309b91e12d1f579a8010b8121;hb=10985d71f77b627bc4da543d7114feb7c4529329;hp=3e568438acdef2ecac06a726c2aba9b59ba37258;hpb=408efb5a03252b4a278f69ab9bc588af438c55de;p=senf.git diff --git a/Packets/PacketParser.hh b/Packets/PacketParser.hh index 3e56843..c85ff2f 100644 --- a/Packets/PacketParser.hh +++ b/Packets/PacketParser.hh @@ -465,63 +465,6 @@ namespace senf { SENF_PARSER_FINALIZE(VoidPacketParser); }; - /** \brief Iterator re-validating Parser wrapper - - An ordinary parser will be invalidated whenever the raw data container's size is - changed. This can complicate some algorithms considerably. - - This wrapper will update the parsers iterator (the value returned by the i() member) on - every access. This ensures that the iterator will stay valid. - - \attention Beware however, if you insert or remove data before the safe wrapper, the - location will \e not be updated accordingly and therefore the parser will be - invalid. - - Additionally a SafePacketParserWrapper has an uninitialized state. The only allowed operations in - this state are the boolean test for validity and assigning another parser. - - \ingroup packetparser - */ - template - class SafePacketParserWrapper - : public safe_bool< SafePacketParserWrapper > - { - public: - /////////////////////////////////////////////////////////////////////////// - // Types - - /////////////////////////////////////////////////////////////////////////// - ///\name Structors and default members - ///@{ - - // default copy constructor - // default copy assignment - // default destructor - SafePacketParserWrapper(); ///< Create an empty uninitialized SafePacketParserWrapper - - // conversion constructors - SafePacketParserWrapper(Parser parser); ///< Initialize SafePacketParserWrapper from \a parser - - SafePacketParserWrapper & operator=(Parser parser); ///< Assign \a parser to \c this - - ///@} - /////////////////////////////////////////////////////////////////////////// - - Parser operator*() const; ///< Access the stored parser - /**< On every access, the stored parsers iterator will be - updated / re-validated. */ - Parser const * operator->() const; ///< Access the stored parser - /**< On every access, the stored parsers iterator will be - updated / re-validated. */ - bool boolean_test() const; ///< Check validity - - protected: - - private: - mutable boost::optional parser_; - senf::safe_data_iterator i_; - }; - } ///////////////////////////////hh.e////////////////////////////////////////