MIHMessageRegistry.cc
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #include "MIHMessageRegistry.hh"
18 
19 // Custom includes
20 
21 #define prefix_
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 // senf::MIHMessageRegistry
24 
26 {
27  Map::const_iterator i (map_.find( messageId));
28  if (i != map_.end())
29  i->second->validate( message);
30  else
31  throw InvalidMIHPacketException("unknown message id: ") << messageId;
32 }
33 
35  const
36 {
37  return map_.begin();
38 }
39 
41  const
42 {
43  return map_.end();
44 }
45 
46 //-/////////////////////////////////////////////////////////////////////////////////////////////////
47 #undef prefix_
48 
49 
50 // Local Variables:
51 // mode: c++
52 // fill-column: 100
53 // c-file-style: "senf"
54 // indent-tabs-mode: nil
55 // ispell-local-dictionary: "american"
56 // compile-command: "scons -u test"
57 // comment-column: 40
58 // End:
void validate(key_t messageId, senf::Packet message)
MIH Message-Registry public header.
const_iterator begin() const
raw_container::const_iterator const_iterator
Definition: PacketTypes.hh:70
Main Packet class.
Definition: Packet.hh:131
#define prefix_
const_iterator end() const
Map::const_iterator const_iterator