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/fib.hpp b/daemon/table/fib.hpp
index 73e0e21..fc5439f 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -105,10 +105,10 @@
typedef boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range> Range;
typedef boost::range_iterator<Range>::type const_iterator;
- /** \brief returns an iterator pointing to the first FIB entry
- * \note Iteration order is implementation-specific and is undefined
- * \note The returned iterator may get invalidated if FIB or another NameTree-based
- * table is modified
+ /** \return an iterator to the beginning
+ * \note Iteration order is implementation-defined.
+ * \warning Undefined behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry
+ * is inserted or erased during enumeration.
*/
const_iterator
begin() const
@@ -116,9 +116,8 @@
return this->getRange().begin();
}
- /** \brief returns an iterator referring to the past-the-end FIB entry
- * \note The returned iterator may get invalidated if FIB or another NameTree-based
- * table is modified
+ /** \return an iterator to the end
+ * \sa begin()
*/
const_iterator
end() const