Task #1202
Updated by Junxiao Shi over 10 years ago
Add shortcuts between conceptual tables backed by NameTree. ## API This includes these APIs: * `Fib::findLongestPrefixMatch(const pit::Entry&)` get FIB entry from PIT entry * `Fib::findLongestPrefixMatch(const measurements::Entry&)` get FIB entry from Measurements entry * `StrategyChoice::findEffectiveStrategy(const pit::Entry&)` get Measurements entry from FIB entry * `Measurements::get(const pit:*Entry&)` ## Design * xx::Entry needs to declare in "private:" section: shared_ptr<name_tree::Entry> m_nameTreeEntry; friend class NameTree; friend class name_tree::Entry; * `name_tree::Entry` methods should set m\_nameTreeEntry member when xx::Entry is attached, and unset when xx::Entry is detached (don’t forget to unset on the old attached xx::Entry when attaching a new FIB/Measurements/StrategyChoice entry) get Measurements entry from PIT entry * `NameTree::get(const xx::Entry&) const` returns m\_nameTreeEntry. This is called by `Fib::findLongestPrefixMatch(const pit::Entry&)` and other methods, so Fib/etc needn’t be made friends of pit::Entry. * Implement Fib::findLongestPrefixMatch overload, etc, by going through the NameTree entries.