X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacket.hh;h=d1485984cffe316497da488b3dea81abdb6ff00c;hb=b8ca4a544cce3e6023bb56b712a03d6362f2bb79;hp=d3b42a402eefb6e8bcb356cd25bcd266dd77afe4;hpb=f52075dad8b8291570fa2c61ef9b5ec0a04d1e5e;p=senf.git diff --git a/Packets/Packet.hh b/Packets/Packet.hh index d3b42a4..d148598 100644 --- a/Packets/Packet.hh +++ b/Packets/Packet.hh @@ -269,7 +269,10 @@ namespace senf { OtherPacket. The new packet is added to the chain after \c this. \returns new packet instance sharing the same data and - placed after \c this packet in the chain. */ + placed after \c this packet in the chain. + \throws InvalidPacketChainException if no next + packet header is allowed (viz. nextPacketRange() of the the current + PacketType returns no_range() ) */ Packet parseNextAs(factory_t factory) const; ///< Interpret payload of \c this as \a factory type packet /**< parseNextAs() will throw away the packet chain after @@ -278,7 +281,10 @@ namespace senf { factory. The new packet is added to the chain after \c this. \returns new packet instance sharing the same data and - placed after \c this packet in the chain. */ + placed after \c this packet in the chain. + \throws InvalidPacketChainException if no next + packet header is allowed (viz. nextPacketRange() of the the current + PacketType returns no_range() ) */ template bool is() const; ///< Check, whether \c this packet is of the given type @@ -376,6 +382,10 @@ namespace senf { ///@} + template + Annotation const & annotation() const; ///< Get packet annotation + /**< \see annotation() */ + ///\name Other methods ///@{ @@ -728,6 +738,15 @@ namespace senf { friend class PacketInterpreter; }; + /** \brief Generic parser copying + + This operator allows to copy the value of identical parsers. This operation does \e not + depend on the parsers detailed implementation, it will just replace the data bytes of the + target parser with those from the source packet. + */ + template + Parser operator<<(Parser target, ConcretePacket const & packet); + ///@} }