table: StrategyInfoHost stores multiple StrategyInfo of distinct types
refs #2240
Change-Id: I25062260e3bb4f2f36989305431d4b718d320505
diff --git a/daemon/fw/ncc-strategy.hpp b/daemon/fw/ncc-strategy.hpp
index 72f39e4..14a4696 100644
--- a/daemon/fw/ncc-strategy.hpp
+++ b/daemon/fw/ncc-strategy.hpp
@@ -56,6 +56,12 @@
class MeasurementsEntryInfo : public StrategyInfo
{
public:
+ static constexpr int
+ getTypeId()
+ {
+ return 1000;
+ }
+
MeasurementsEntryInfo();
void
@@ -93,6 +99,12 @@
class PitEntryInfo : public StrategyInfo
{
public:
+ static constexpr int
+ getTypeId()
+ {
+ return 1001;
+ }
+
virtual
~PitEntryInfo();
diff --git a/daemon/fw/strategy-info.hpp b/daemon/fw/strategy-info.hpp
index d670f10..b701fc5 100644
--- a/daemon/fw/strategy-info.hpp
+++ b/daemon/fw/strategy-info.hpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#ifndef NFD_DAEMON_FW_STRATEGY_INFO_HPP
#define NFD_DAEMON_FW_STRATEGY_INFO_HPP
@@ -30,12 +31,21 @@
namespace nfd {
namespace fw {
-/** \class StrategyInfo
- * \brief contains arbitrary information forwarding strategy places on table entries
+/** \brief contains arbitrary information forwarding strategy places on table entries
*/
class StrategyInfo
{
public:
+ /** \fn static constexpr int getTypeId()
+ * \return an integer that uniquely identifies this StrategyInfo type
+ * \sa http://redmine.named-data.net/projects/nfd/wiki/StrategyInfoType
+ */
+ // static constexpr int
+ // getTypeId()
+ // {
+ // return <type-identifier>;
+ // }
+
virtual
~StrategyInfo();
};