X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacket.hh;h=59f7d56fb579a5232c463f23653f3a2b36b5098b;hb=9bfe0b87be0926193b5baf13865cf045f0de0b0d;hp=8f8dad56703ab1fd4e703ef6396442af727841e4;hpb=8d2d26f114d3df0a60c5c516fcf40671b1e55558;p=senf.git diff --git a/Packets/Packet.hh b/Packets/Packet.hh index 8f8dad5..59f7d56 100644 --- a/Packets/Packet.hh +++ b/Packets/Packet.hh @@ -184,6 +184,8 @@ namespace senf { Packet next() const; ///< Get next packet in chain + /**< \returns in - valid() packet, if no next packet + exists */ template OtherPacket next() const; ///< Get next packet of given type in chain /**< \throws InvalidPacketChainException if no such packet @@ -192,7 +194,8 @@ namespace senf { ///< Get next packet of given type in chain /**< \param[in] nothrow This argument always has the value \c senf::nothrow - \returns in-valid() packet, if no such packet is found */ + \returns in - valid() packet, if no such packet is + found */ template OtherPacket findNext() const; ///< Find next packet of given type in chain /**< findNext() is like next(), it will however return \c @@ -205,11 +208,14 @@ namespace senf { *this if it is of the given type. \param[in] nothrow This argument always has the value \c senf::nothrow - \returns in-valid() packet, if no such packet is found */ + \returns in - valid() packet, if no such packet is + found */ Packet prev() const; ///< Get previous packet in chain + /**< \returns in - valid() packet, if no previous packet + exists */ template OtherPacket prev() const; ///< Get previous packet of given type in chain /**< \throws InvalidPacketChainException if no such packet @@ -218,7 +224,8 @@ namespace senf { ///< Get previous packet of given type in chain /**< \param[in] nothrow This argument always has the value \c senf::nothrow - \returns in-valid() packet, if no such packet is found */ + \returns in - valid() packet, if no such packet is + found */ template OtherPacket findPrev() const; ///< Find previous packet of given type in chain /**< findPrev() is like prev(), it will however return \c @@ -231,7 +238,8 @@ namespace senf { *this if it is of the type \param[in] nothrow This argument always has the value \c senf::nothrow - \returns in-valid() packet, if no such packet is found */ + \returns in - valid() packet, if no such packet is + found */ Packet first() const; @@ -244,7 +252,8 @@ namespace senf { ///< Return first packet of given type in chain /**< \param[in] nothrow This argument always has the value \c senf::nothrow - \returns in-valid() packet, if no such packet is found */ + \returns in - valid() packet, if no such packet is + found */ Packet last() const; ///< Return last packet in chain @@ -256,7 +265,8 @@ namespace senf { ///< Return last packet of given type in chain /**< \param[in] nothrow This argument always has the value \c senf::nothrow - \returns in-valid() packet, if no such packet is found */ + \returns in - valid() packet, if no such packet is + found */ template OtherPacket parseNextAs() const; @@ -321,10 +331,12 @@ namespace senf { bool boolean_test() const; ///< Check, whether the packet is valid() /**< \see valid() */ bool valid() const; ///< Check, whether the packet is valid() - /**< An in-valid() packet does not allow any operation - except checking for validity and assignment. in-valid() - packets serve the same role as 0-pointers. */ - + /**< An in - valid() packet does not allow any operation + except checking for validity and assignment. in - + valid() packets serve the same role as 0-pointers. + + This is an alias for boolean_test() which is called + when using a packet in a boolean context. */ void finalize() const; ///< Update calculated fields /**< This call will update all calculated fields of the @@ -372,6 +384,7 @@ namespace senf { template friend class ConcretePacket; + friend class PacketParserBase; }; /** \brief Protocol specific packet handle