X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketParser.hh;h=59124e3c87d0b1954aa01fb6a9fb4dc1f8ee9af2;hb=6a0836b7f462d3d77b79b35638cdbf4c9d4202fc;hp=1e389da790b1499f51a0e40f9fe06589a8b6a3dc;hpb=4ee78597a1dae53669f5295cbb686c58146d2449;p=senf.git diff --git a/Packets/PacketParser.hh b/Packets/PacketParser.hh index 1e389da..59124e3 100644 --- a/Packets/PacketParser.hh +++ b/Packets/PacketParser.hh @@ -136,16 +136,16 @@ parsers). When defining composite parsers without the help of the \ref packetparsermacros, you should provide those same members. - \subsection parserimpl_packet Packet parsers + \subsection parserimpl_packet Protocol parsers - Packet parsers are composite parsers with relaxed requirements. Since a packet parser will never - be used as a sub-parser (it will not be used within another composite parser or as value type in - a collection parser), the value returned by senf::bytes for this parser must not necessarily - cover the complete packet (e.g. if the packet has a trailer, the trailer will live outside the - range given by senf::bytes). You may define any member you want to have in your packets field - interface. These members may access the packet data in any way. You just need to ensure, that - the integration into the packet-type is correct (the senf::PacketTypeMixin will by default use - senf::bytes() to find the end of the header). + Protocol parsers are composite parsers with relaxed requirements. Since a Protocol parser will + never be used as a sub-parser (it will not be used within another composite parser or as value + type in a collection parser), the value returned by senf::bytes for this parser must not + necessarily cover the complete packet (e.g. if the packet has a trailer, the trailer will live + outside the range given by senf::bytes). You may define any member you want to have in your + packets field interface. These members may access the packet data in any way. You just need to + ensure, that the integration into the packet-type is correct (the senf::PacketTypeMixin will by + default use senf::bytes() to find the end of the header).
*/ @@ -402,6 +402,20 @@ namespace senf { struct init_bytes : public detail::ParserInitBytes {}; + /** \brief Test, whether a parser is a fixed-size parser + + This meta-function is called like + \code + senf::is_fixed::value + \endcode + + This expression evaluates to a compile-time constant boolean expression which is \c true, if + \a SomeParser is a fixed size parser, \c false otherwise + + \param[in] Parser The Parser to test + \returns \c true, if \a Parser is fixed size, \c false otherwise + \ingroup packetparser + */ template struct is_fixed : public detail::ParserIsFixed {};