table: simplify StrategyChoice iterator with Boost.Range
This commit also improves Doxygen in NameTree, Fib, and Pit enumeration.
refs #3738
Change-Id: Ibb56f958df4d1bc2564192d905cfc2e499a7875e
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index be10945..c3d02e3 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -266,10 +266,12 @@
}
}
-StrategyChoice::const_iterator
-StrategyChoice::begin() const
+StrategyChoice::Range
+StrategyChoice::getRange() const
{
- return const_iterator(m_nameTree.fullEnumerate(&nteHasStrategyChoiceEntry).begin());
+ return m_nameTree.fullEnumerate(&nteHasStrategyChoiceEntry) |
+ boost::adaptors::transformed(name_tree::GetTableEntry<Entry>(
+ &name_tree::Entry::getStrategyChoiceEntry));
}
} // namespace strategy_choice