#include <boost/multi_index_container.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/sequenced_index.hpp>
-#include <boost/multi_index/mem_fun.hpp>
#include <boost/multi_index/global_fun.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
class ExchangeStats {
public:
- static uint32_t transid_hash(boost::shared_ptr<T> packet) {
+ static uint32_t transid_hash(const boost::shared_ptr<T> packet) {
return packet->getTransid() & 1023;
}
> PktList;
/// Packet list iterator for sequencial access to elements.
- typedef typename PktList::iterator PktListIterator;
+ typedef typename PktList::const_iterator PktListIterator;
/// Packet list index to search packets using transaction id.
typedef typename PktList::template nth_index<1>::type
PktListTransidIndex;
/// Packet list iterator to access packets using transaction id.
- typedef typename PktListTransidIndex::iterator PktListTransidIterator;
+ typedef typename PktListTransidIndex::const_iterator PktListTransidIterator;
/// \brief Constructor
///
/// \param sent_packet sent packet
/// \param rcvd_packet received packet
/// \throw isc::Unexpected if failed to calculate timestamps
- void updateDelays(const boost::shared_ptr<T> sent_packet,
- const boost::shared_ptr<T> rcvd_packet) {
+ void updateDelays(const boost::shared_ptr<const T> sent_packet,
+ const boost::shared_ptr<const T> rcvd_packet) {
boost::posix_time::ptime sent_time = sent_packet->getTimestamp();
boost::posix_time::ptime rcvd_time = rcvd_packet->getTimestamp();
/// Map containing custom counters.
typedef typename std::map<std::string, CustomCounterPtr> CustomCountersMap;
/// Iterator for \ref CustomCountersMap.
- typedef typename CustomCountersMap::iterator CustomCountersMapIterator;
+ typedef typename CustomCountersMap::const_iterator CustomCountersMapIterator;
/// \brief Constructor.
StatsMgr()