X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FGenericTLV.hh;h=b1298e0ce66dbe5bedde2affc29e649d17950077;hb=9762e8c5d2f6c1264ba97acd3e589f6fa8f522c6;hp=7cb5da74140ab8c7663041dc0bb69509fddf0571;hpb=bea7cfcf3d02688ece159d76890acfe2d0051d71;p=senf.git diff --git a/senf/Packets/GenericTLV.hh b/senf/Packets/GenericTLV.hh index 7cb5da7..b1298e0 100644 --- a/senf/Packets/GenericTLV.hh +++ b/senf/Packets/GenericTLV.hh @@ -193,6 +193,16 @@ namespace senf { { virtual void dump(GenericTLVParserBase const & parser, std::ostream & os) const; }; + + //Helper Functor for STL-compatible predicate (E.g. find_if, for_each ...) + template + class Predicate + { + public: + const bool operator() (BaseParser const &p) const{ + return p.template is(); + } + }; } /** \brief TLV parser registration facility