build: prepend "NFD_" to various macro names to avoid conflicts

Change-Id: Icc370968e3d38fef80ece35a2aed56450f54b653
diff --git a/daemon/fw/best-route-strategy2.hpp b/daemon/fw/best-route-strategy2.hpp
index bcb994d..79c6c0d 100644
--- a/daemon/fw/best-route-strategy2.hpp
+++ b/daemon/fw/best-route-strategy2.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,
@@ -68,7 +68,7 @@
   afterReceiveNack(const FaceEndpoint& ingress, const lp::Nack& nack,
                    const shared_ptr<pit::Entry>& pitEntry) override;
 
-PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   static const time::milliseconds RETX_SUPPRESSION_INITIAL;
   static const time::milliseconds RETX_SUPPRESSION_MAX;
   RetxSuppressionExponential m_retxSuppression;
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index f736e0f..4bdd42a 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.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,
@@ -54,7 +54,7 @@
   explicit
   Forwarder(FaceTable& faceTable);
 
-  VIRTUAL_WITH_TESTS
+  NFD_VIRTUAL_WITH_TESTS
   ~Forwarder();
 
   const ForwarderCounters&
@@ -165,76 +165,76 @@
     return m_networkRegionTable;
   }
 
-PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
+NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
   /** \brief incoming Interest pipeline
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onIncomingInterest(const FaceEndpoint& ingress, const Interest& interest);
 
   /** \brief Interest loop pipeline
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onInterestLoop(const FaceEndpoint& ingress, const Interest& interest);
 
   /** \brief Content Store miss pipeline
   */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onContentStoreMiss(const FaceEndpoint& ingress,
                      const shared_ptr<pit::Entry>& pitEntry, const Interest& interest);
 
   /** \brief Content Store hit pipeline
   */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onContentStoreHit(const FaceEndpoint& ingress, const shared_ptr<pit::Entry>& pitEntry,
                     const Interest& interest, const Data& data);
 
   /** \brief outgoing Interest pipeline
    *  \return A pointer to the out-record created or nullptr if the Interest was dropped
    */
-  VIRTUAL_WITH_TESTS pit::OutRecord*
+  NFD_VIRTUAL_WITH_TESTS pit::OutRecord*
   onOutgoingInterest(const shared_ptr<pit::Entry>& pitEntry,
                      Face& egress, const Interest& interest);
 
   /** \brief Interest finalize pipeline
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onInterestFinalize(const shared_ptr<pit::Entry>& pitEntry);
 
   /** \brief incoming Data pipeline
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onIncomingData(const FaceEndpoint& ingress, const Data& data);
 
   /** \brief Data unsolicited pipeline
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onDataUnsolicited(const FaceEndpoint& ingress, const Data& data);
 
   /** \brief outgoing Data pipeline
    *  \return Whether the Data was transmitted (true) or dropped (false)
    */
-  VIRTUAL_WITH_TESTS bool
+  NFD_VIRTUAL_WITH_TESTS bool
   onOutgoingData(const Data& data, Face& egress);
 
   /** \brief incoming Nack pipeline
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onIncomingNack(const FaceEndpoint& ingress, const lp::Nack& nack);
 
   /** \brief outgoing Nack pipeline
    *  \return Whether the Nack was transmitted (true) or dropped (false)
    */
-  VIRTUAL_WITH_TESTS bool
+  NFD_VIRTUAL_WITH_TESTS bool
   onOutgoingNack(const shared_ptr<pit::Entry>& pitEntry,
                  Face& egress, const lp::NackHeader& nack);
 
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onDroppedInterest(const Face& egress, const Interest& interest);
 
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   onNewNextHop(const Name& prefix, const fib::NextHop& nextHop);
 
-PROTECTED_WITH_TESTS_ELSE_PRIVATE:
+NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
   /** \brief set a new expiry timer (now + \p duration) on a PIT entry
    */
   void
@@ -244,18 +244,18 @@
    *  \param upstream if null, insert Nonces from all out-records;
    *                  if not null, insert Nonce only on the out-records of this face
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   insertDeadNonceList(pit::Entry& pitEntry, Face* upstream);
 
   /** \brief call trigger (method) on the effective strategy of pitEntry
    */
-#ifdef WITH_TESTS
+#ifdef NFD_WITH_TESTS
   virtual void
   dispatchToStrategy(pit::Entry& pitEntry, std::function<void(fw::Strategy&)> trigger)
 #else
   template<class Function>
   void
-  dispatchToStrategy(pit::Entry& pitEntry, Function trigger)
+  dispatchToStrategy(pit::Entry& pitEntry, Function&& trigger)
 #endif
   {
     trigger(m_strategyChoice.findEffectiveStrategy(pitEntry));
diff --git a/daemon/fw/multicast-strategy.hpp b/daemon/fw/multicast-strategy.hpp
index 711680a..3dd9f6c 100644
--- a/daemon/fw/multicast-strategy.hpp
+++ b/daemon/fw/multicast-strategy.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,
@@ -57,7 +57,7 @@
   friend ProcessNackTraits<MulticastStrategy>;
   RetxSuppressionExponential m_retxSuppression;
 
-PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   static const time::milliseconds RETX_SUPPRESSION_INITIAL;
   static const time::milliseconds RETX_SUPPRESSION_MAX;
 };
diff --git a/daemon/fw/ncc-strategy.hpp b/daemon/fw/ncc-strategy.hpp
index dadbded..3ba5019 100644
--- a/daemon/fw/ncc-strategy.hpp
+++ b/daemon/fw/ncc-strategy.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,
@@ -50,7 +50,7 @@
   beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
                         const FaceEndpoint& ingress, const Data& data) override;
 
-PUBLIC_WITH_TESTS_ELSE_PROTECTED:
+NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /// StrategyInfo on measurements::Entry
   class MeasurementsEntryInfo : public StrategyInfo
   {
diff --git a/daemon/fw/strategy-info.hpp b/daemon/fw/strategy-info.hpp
index aae3862..49b5b95 100644
--- a/daemon/fw/strategy-info.hpp
+++ b/daemon/fw/strategy-info.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  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 contains arbitrary information forwarding strategy places on table entries
+/** \brief Contains arbitrary information placed by the forwarding strategy on table entries
  */
 class StrategyInfo
 {
@@ -41,10 +41,7 @@
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/StrategyInfoType
    */
   static constexpr int
-  getTypeId()
-  {
-    return <type-identifier>;
-  }
+  getTypeId();
 #endif
 
   virtual
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 37b1553..571d7d1 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.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,
@@ -257,7 +257,7 @@
    *  \param interest the Interest packet
    *  \return A pointer to the out-record created or nullptr if the Interest was dropped
    */
-  VIRTUAL_WITH_TESTS pit::OutRecord*
+  NFD_VIRTUAL_WITH_TESTS pit::OutRecord*
   sendInterest(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
                const Interest& interest);
 
@@ -267,7 +267,7 @@
    *  \param egress face through which to send out the Data
    *  \return Whether the Data was sent (true) or dropped (false)
    */
-  VIRTUAL_WITH_TESTS bool
+  NFD_VIRTUAL_WITH_TESTS bool
   sendData(const shared_ptr<pit::Entry>& pitEntry, const Data& data, Face& egress);
 
   /** \brief Send a Data packet to all matched and qualified faces.
@@ -278,7 +278,7 @@
    *  \param inFace face on which the Data arrived
    *  \param data the Data packet
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   sendDataToAll(const shared_ptr<pit::Entry>& pitEntry, const Face& inFace, const Data& data);
 
   /** \brief Schedule the PIT entry for immediate deletion.
@@ -287,7 +287,7 @@
    *  The strategy should invoke this function when it concludes that the Interest cannot
    *  be forwarded and it does not want to wait for responses from existing upstream nodes.
    */
-  VIRTUAL_WITH_TESTS void
+  NFD_VIRTUAL_WITH_TESTS void
   rejectPendingInterest(const shared_ptr<pit::Entry>& pitEntry)
   {
     this->setExpiryTimer(pitEntry, 0_ms);
@@ -302,7 +302,7 @@
    *  \param header the Nack header
    *  \return Whether the Nack was sent (true) or dropped (false)
    */
-  VIRTUAL_WITH_TESTS bool
+  NFD_VIRTUAL_WITH_TESTS bool
   sendNack(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
            const lp::NackHeader& header)
   {
@@ -388,7 +388,7 @@
     m_name = name;
   }
 
-PUBLIC_WITH_TESTS_ELSE_PROTECTED: // setter
+NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED: // setter
   /** \brief Set whether the afterNewNextHop trigger should be invoked for this strategy
    */
   void