fw: accept const shared_ptr<pit::Entry>& in Forwarder pipelines and Strategy actions

refs #3205

Change-Id: Ia683fb1a9e301270f99bcdd4d97493abf3dbec9f
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 4f3da2c..5cea6a6 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -50,9 +50,13 @@
   virtual
   ~Strategy();
 
-  /// a Name that represent the Strategy program
+  /** \return a Name that represents the strategy program
+   */
   const Name&
-  getName() const;
+  getName() const
+  {
+    return m_name;
+  }
 
 public: // triggers
   /** \brief trigger after Interest is received
@@ -131,8 +135,11 @@
    *                      rather than reusing a Nonce from one of the PIT in-records
    */
   VIRTUAL_WITH_TESTS void
-  sendInterest(shared_ptr<pit::Entry> pitEntry, Face& outFace,
-               bool wantNewNonce = false);
+  sendInterest(const shared_ptr<pit::Entry>& pitEntry, Face& outFace,
+               bool wantNewNonce = false)
+  {
+    m_forwarder.onOutgoingInterest(pitEntry, outFace, wantNewNonce);
+  }
 
   /** \brief decide that a pending Interest cannot be forwarded
    *  \param pitEntry PIT entry
@@ -141,7 +148,10 @@
    *  forwarded earlier, and does not need to be resent now.
    */
   VIRTUAL_WITH_TESTS void
-  rejectPendingInterest(shared_ptr<pit::Entry> pitEntry);
+  rejectPendingInterest(const shared_ptr<pit::Entry>& pitEntry)
+  {
+    m_forwarder.onInterestReject(pitEntry);
+  }
 
   /** \brief send Nack to outFace
    *  \param pitEntry PIT entry
@@ -151,8 +161,11 @@
    *  The outFace must have a PIT in-record, otherwise this method has no effect.
    */
   VIRTUAL_WITH_TESTS void
-  sendNack(shared_ptr<pit::Entry> pitEntry, const Face& outFace,
-           const lp::NackHeader& header);
+  sendNack(const shared_ptr<pit::Entry>& pitEntry, const Face& outFace,
+           const lp::NackHeader& header)
+  {
+    m_forwarder.onOutgoingNack(pitEntry, outFace, header);
+  }
 
   /** \brief send Nack to every face that has an in-record,
    *         except those in \p exceptFaces
@@ -162,21 +175,33 @@
    *  \note This is not an action, but a helper that invokes the sendNack action.
    */
   void
-  sendNacks(shared_ptr<pit::Entry> pitEntry, const lp::NackHeader& header,
+  sendNacks(const shared_ptr<pit::Entry>& pitEntry, const lp::NackHeader& header,
             std::initializer_list<const Face*> exceptFaces = std::initializer_list<const Face*>());
 
 protected: // accessors
   const fib::Entry&
-  lookupFib(const pit::Entry& pitEntry);
+  lookupFib(const pit::Entry& pitEntry)
+  {
+    return m_forwarder.lookupFib(pitEntry);
+  }
 
   MeasurementsAccessor&
-  getMeasurements();
+  getMeasurements()
+  {
+    return m_measurements;
+  }
 
   Face*
-  getFace(FaceId id) const;
+  getFace(FaceId id) const
+  {
+    return m_forwarder.getFace(id);
+  }
 
   const FaceTable&
-  getFaceTable() const;
+  getFaceTable() const
+  {
+    return m_forwarder.getFaceTable();
+  }
 
 protected: // accessors
   signal::Signal<FaceTable, Face&>& afterAddFace;
@@ -194,55 +219,6 @@
   MeasurementsAccessor m_measurements;
 };
 
-inline const Name&
-Strategy::getName() const
-{
-  return m_name;
-}
-
-inline void
-Strategy::sendInterest(shared_ptr<pit::Entry> pitEntry, Face& outFace, bool wantNewNonce)
-{
-  m_forwarder.onOutgoingInterest(pitEntry, outFace, wantNewNonce);
-}
-
-inline void
-Strategy::rejectPendingInterest(shared_ptr<pit::Entry> pitEntry)
-{
-  m_forwarder.onInterestReject(pitEntry);
-}
-
-inline void
-Strategy::sendNack(shared_ptr<pit::Entry> pitEntry, const Face& outFace,
-                   const lp::NackHeader& header)
-{
-  m_forwarder.onOutgoingNack(pitEntry, outFace, header);
-}
-
-inline const fib::Entry&
-Strategy::lookupFib(const pit::Entry& pitEntry)
-{
-  return m_forwarder.lookupFib(pitEntry);
-}
-
-inline MeasurementsAccessor&
-Strategy::getMeasurements()
-{
-  return m_measurements;
-}
-
-inline Face*
-Strategy::getFace(FaceId id) const
-{
-  return m_forwarder.getFace(id);
-}
-
-inline const FaceTable&
-Strategy::getFaceTable() const
-{
-  return m_forwarder.getFaceTable();
-}
-
 } // namespace fw
 } // namespace nfd