X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FGenericTLV.ct;h=6605618a17be93b8f6e64490200e311985867c5d;hb=47d8fe245087b57098115b66094872cfffb8cbed;hp=8d6c085e8f9b9727e7e1be662cf94ed17b034511;hpb=33d8f945cadcf912e8637a59d97ac1d1b320af9f;p=senf.git diff --git a/senf/Packets/GenericTLV.ct b/senf/Packets/GenericTLV.ct index 8d6c085..6605618 100644 --- a/senf/Packets/GenericTLV.ct +++ b/senf/Packets/GenericTLV.ct @@ -97,7 +97,6 @@ template prefix_ void senf::GenericTLVParserRegistry::registerParser() { Keytype key (Parser::typeId+0); - std::cout << "GenericTLVParserRegistry::registerParser " << unsigned(key) << std::endl; typename Map::iterator i (map_.find( key )); if (i == map_.end() ) map_.insert(key, new detail::GenericTLVParserRegistry_Entry() ); @@ -135,6 +134,18 @@ prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistry +prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistry::bytes( + GenericTLVParser const & parser, Keytype const & key) + const +{ + typename Map::const_iterator i (map_.find( key)); + if (i != map_.end()) + return (i->second)->bytes(parser); + else + throw TLVParserNotRegisteredException(); +} + ///////////////////////////////ct.e////////////////////////////////////////