strategy-choice-entry.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
27 #include "core/logger.hpp"
28 #include "fw/strategy.hpp"
29 
30 namespace nfd {
31 namespace strategy_choice {
32 
33 Entry::Entry(const Name& prefix)
34  : m_prefix(prefix)
35  , m_nameTreeEntry(nullptr)
36 {
37 }
38 
39 Entry::~Entry() = default;
40 
41 const Name&
43 {
44  return this->getStrategy().getInstanceName();
45 }
46 
47 void
48 Entry::setStrategy(unique_ptr<fw::Strategy> strategy)
49 {
50  m_strategy = std::move(strategy);
51 }
52 
53 } // namespace strategy_choice
54 } // namespace nfd
fw::Strategy & getStrategy() const
const Name & getInstanceName() const
Definition: strategy.hpp:110
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
const Name & getStrategyInstanceName() const
Entry(const Name &prefix)
void setStrategy(unique_ptr< fw::Strategy > strategy)
~Entry()