prefix_ void senf::GenericTLVParserRegistry<BaseParser,Keytype>::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<BaseParser, Parser>() );
throw TLVParserNotRegisteredException();
}
+template <class BaseParser, class Keytype>
+prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistry<BaseParser,Keytype>::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////////////////////////////////////////