fw: delete deprecated Strategy::getName in favor of getInstanceName
This commit also renames strategy_choice::Entry::getStrategyName
to getStrategyInstanceName.
refs #3868
Change-Id: I40301e744fc236918d6be1c1262eba952198e22f
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index 06acaae..b251a97 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -57,7 +57,7 @@
{
auto entry = make_unique<Entry>(Name());
entry->setStrategy(Strategy::create(strategyName, m_forwarder));
- NFD_LOG_INFO("setDefaultStrategy " << entry->getStrategyName());
+ NFD_LOG_INFO("setDefaultStrategy " << entry->getStrategyInstanceName());
// don't use .insert here, because it will invoke findEffectiveStrategy
// which expects an existing root entry
@@ -86,7 +86,7 @@
/// m_strategyInstances, install, getStrategy, hasStrategy should be eliminated.
BOOST_ASSERT(strategy != nullptr);
- Name strategyName = strategy->getName();
+ Name strategyName = strategy->getInstanceName();
// copying Name, so that strategyName remains available even if strategy is deallocated
bool isInserted = false;
@@ -142,13 +142,13 @@
Entry* entry = nte.getStrategyChoiceEntry();
Strategy* oldStrategy = nullptr;
if (entry != nullptr) {
- if (entry->getStrategyName() == strategy->getName()) {
- NFD_LOG_TRACE("insert(" << prefix << ") not changing " << strategy->getName());
+ if (entry->getStrategyInstanceName() == strategy->getInstanceName()) {
+ NFD_LOG_TRACE("insert(" << prefix << ") not changing " << strategy->getInstanceName());
return true;
}
oldStrategy = &entry->getStrategy();
- NFD_LOG_TRACE("insert(" << prefix << ") changing from " << oldStrategy->getName() <<
- " to " << strategy->getName());
+ NFD_LOG_TRACE("insert(" << prefix << ") changing from " << oldStrategy->getInstanceName() <<
+ " to " << strategy->getInstanceName());
}
else {
oldStrategy = &this->findEffectiveStrategy(prefix);
@@ -156,7 +156,7 @@
entry = newEntry.get();
nte.setStrategyChoiceEntry(std::move(newEntry));
++m_nItems;
- NFD_LOG_TRACE("insert(" << prefix << ") new entry " << strategy->getName());
+ NFD_LOG_TRACE("insert(" << prefix << ") new entry " << strategy->getInstanceName());
}
this->changeStrategy(*entry, *oldStrategy, *strategy);
@@ -207,7 +207,7 @@
return {false, Name()};
}
- return {true, entry->getStrategy().getName()};
+ return {true, entry->getStrategyInstanceName()};
}
template<typename K>
@@ -265,8 +265,8 @@
}
NFD_LOG_INFO("changeStrategy(" << entry.getPrefix() << ")"
- << " from " << oldStrategy.getName()
- << " to " << newStrategy.getName());
+ << " from " << oldStrategy.getInstanceName()
+ << " to " << newStrategy.getInstanceName());
// reset StrategyInfo on a portion of NameTree,
// where entry's effective strategy is covered by the changing StrategyChoice entry