[router-table] add documentation for Iterate() method (#5270)

This commit is contained in:
Abtin Keshavarzian
2020-07-22 08:40:22 -07:00
committed by GitHub
parent 00f3043a06
commit df2fa4c548
+10
View File
@@ -389,6 +389,16 @@ public:
*/
void ProcessTimerTick(void);
/**
* This method enables range-based `for` loop iteration over all Router entries in the Router table.
*
* This method should be used as follows:
*
* for (Router &router : Get<RouterTable>().Iterate()) { ... }
*
* @returns An `IteratorBuilder` instance.
*
*/
IteratorBuilder Iterate(void) { return IteratorBuilder(GetInstance()); }
private: