Task #1315
Updated by Junxiao Shi over 10 years ago
Allow enumerating FIB entries. ## API class Fib { public: typedef ... const_iterator; // an iterator of pointing to shared_ptr<fib::Entry> const_iterator begin() cbegin() const; const_iterator end() cend() const; }; Usage example: Fib fib(...); for (Fib::const_iterator it = fib.begin(); fib.cbegin(); it < fib.cend(); ++it) { // or it != fib.end(); ++it) fib.cend(); it++) { const shared_ptr<fib::Entry>& fibEntry = *it; // do something with fibEntry }