table: Strategy Choice table
refs #1309
Change-Id: I6fd8efdfc98175a1cc39fdc3aa7175671596f470
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index edffdb3..df4c946 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -18,18 +18,20 @@
namespace fw {
-/** \class Strategy
- * \brief represents a forwarding strategy
+/** \brief represents a forwarding strategy
*/
-class Strategy
+class Strategy : public enable_shared_from_this<Strategy>, noncopyable
{
public:
- explicit
- Strategy(Forwarder& forwarder);
+ Strategy(Forwarder& forwarder, const Name& name);
virtual
~Strategy();
+ /// a Name that represent the Strategy program
+ const Name&
+ getName() const;
+
public: // triggers
/** \brief trigger after Interest is received
*
@@ -113,6 +115,8 @@
getMeasurements();
private:
+ Name m_name;
+
/** \brief reference to the forwarder
*
* Triggers can access forwarder indirectly via actions.
@@ -122,6 +126,12 @@
MeasurementsAccessor m_measurements;
};
+inline const Name&
+Strategy::getName() const
+{
+ return m_name;
+}
+
inline MeasurementsAccessor&
Strategy::getMeasurements()
{