statistics.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NLSR_STATISTICS_HPP
23 #define NLSR_STATISTICS_HPP
24 
25 #include <map>
26 
27 namespace nlsr {
28 
30 {
31 
32 public:
33  enum class PacketType {
54  };
55 
56  size_t
57  get(PacketType) const;
58 
59  void
60  resetAll();
61 
62  void
64 
65  const std::map<PacketType,int>&
66  getCounter() const
67  {
68  return m_packetCounter;
69  }
70 
71 private:
72  std::map<PacketType,int> m_packetCounter;
73 };
74 
75 std::ostream&
76 operator<<(std::ostream&, const Statistics& stats);
77 
78 } // namespace nlsr
79 
80 #endif // NLSR_STATISTICS_HPP
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
Definition: adjacent.cpp:83
const std::map< PacketType, int > & getCounter() const
Definition: statistics.hpp:66
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
void increment(PacketType)
Definition: statistics.cpp:43