Actions
Task #2155
closedNameTree: enumeration with range-based for
Start date:
Due date:
% Done:
100%
Estimated time:
1.50 h
Description
Modify NameTree enumeration functions, so that they can be used with range-based for.
The new API shall support the following snippets:
NameTree nt;
auto&& fullEnumerated = nt.fullEnumerate(...);
for (const name_tree::Entry& nte : fullEnumerated) {
...
}
auto&& partialEnumerated = nt.partialEnumerate(...);
for (const name_tree::Entry& nte : partialEnumerated) {
...
}
auto&& allMatches = nt.findAllMatches(...);
for (const name_tree::Entry& nte : allMatches) {
...
}
Updated by Junxiao Shi about 10 years ago
- Related to Task #2100: Simplify tables with C++11 features added
Updated by Junxiao Shi about 10 years ago
- Status changed from New to In Progress
Updated by Junxiao Shi about 10 years ago
- % Done changed from 0 to 50
findAllMatches
: http://gerrit.named-data.net/1440
The next Change will modify remaining two methods.
Updated by Junxiao Shi almost 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 50 to 100
fullEnumerate
partialEnumerate
http://gerrit.named-data.net/1475
I know Fib::removeNextHopFromAllEntries
isn't so pretty after this change, but the previous code is also not pretty.
Some helper method that wraps "advance iterator before erasing" logic could simplify this, but I'd leave this for a future commit.
Updated by Junxiao Shi almost 10 years ago
- Status changed from Code review to In Progress
- % Done changed from 100 to 80
I'll change NameTree::Range
to either boost::iterator_range
or boost::sub_range
in the next commit.
Updated by Junxiao Shi almost 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 80 to 100
Change NameTree::Range
to boost::iterator_range
: http://gerrit.named-data.net/1504
Updated by Junxiao Shi almost 10 years ago
- Status changed from Code review to Closed
Actions