static inline void
clearStrategyInfo(const name_tree::Entry& nameTreeEntry)
{
  NFD_LOG_TRACE("clearStrategyInfo " << nameTreeEntry.getPrefix());

  std::for_each(nameTreeEntry.getPitEntries().begin(), nameTreeEntry.getPitEntries().end(),
                &clearStrategyInfo_pitEntry);
  if (static_cast<bool>(nameTreeEntry.getMeasurementsEntry())) {
    nameTreeEntry.getMeasurementsEntry()->clearStrategyInfo();
  }
}
Exemplo n.º 2
0
static inline void
clearStrategyInfo(const name_tree::Entry& nte)
{
  NFD_LOG_TRACE("clearStrategyInfo " << nte.getPrefix());

  for (const shared_ptr<pit::Entry>& pitEntry : nte.getPitEntries()) {
    pitEntry->clearStrategyInfo();
    for (const pit::InRecord& inRecord : pitEntry->getInRecords()) {
      const_cast<pit::InRecord&>(inRecord).clearStrategyInfo();
    }
    for (const pit::OutRecord& outRecord : pitEntry->getOutRecords()) {
      const_cast<pit::OutRecord&>(outRecord).clearStrategyInfo();
    }
  }
  if (nte.getMeasurementsEntry() != nullptr) {
    nte.getMeasurementsEntry()->clearStrategyInfo();
  }
}