fw: reorder function params to make the strategy API more uniform
Also add a non-const overload of Face::getCounters to avoid const_cast
Refs: #5173
Change-Id: Iff0bfbdedb90e68a373090cf3f247d9a7501f58d
diff --git a/daemon/fw/process-nack-traits.hpp b/daemon/fw/process-nack-traits.hpp
index 654c896..c07537b 100644
--- a/daemon/fw/process-nack-traits.hpp
+++ b/daemon/fw/process-nack-traits.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,7 +31,7 @@
namespace nfd {
namespace fw {
-/** \brief provides a common procedure for processing Nacks
+/** \brief Provides a common procedure for processing Nacks
*
* This procedure works as follows:
* 1. If Nacks have been received from all upstream faces, return a Nack with least severe reason
@@ -44,7 +44,7 @@
*
* To use this helper, the strategy should inherit from ProcessNackTraits<MyStrategy>,
* and declare that specialization as a friend class.
- * Then, invoke processNack from afterReceiveNack trigger.
+ * Then, invoke processNack() from the Strategy::afterReceiveNack() trigger.
*/
class ProcessNackTraitsBase : noncopyable
{
@@ -53,7 +53,7 @@
~ProcessNackTraitsBase() = default;
void
- processNack(const Face& inFace, const lp::Nack& nack,
+ processNack(const lp::Nack& nack, const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry);
private:
@@ -81,14 +81,14 @@
sendNackForProcessNackTraits(const shared_ptr<pit::Entry>& pitEntry, Face& outFace,
const lp::NackHeader& header) override
{
- m_strategy->sendNack(pitEntry, outFace, header);
+ m_strategy->sendNack(header, outFace, pitEntry);
}
void
sendNacksForProcessNackTraits(const shared_ptr<pit::Entry>& pitEntry,
const lp::NackHeader& header) override
{
- m_strategy->sendNacks(pitEntry, header);
+ m_strategy->sendNacks(header, pitEntry);
}
private: