Feature #4316
closedScoped expressed Interest
100%
Description
Provide a type to hold a PendingInterestId
. When exiting the scope containing an instance of that type, the pending Interest is cancelled.
Updated by Junxiao Shi over 6 years ago
- Status changed from New to In Progress
- Assignee set to Junxiao Shi
- Target version set to v0.7
Updated by Junxiao Shi about 6 years ago
From https://gerrit.named-data.net/c/ndn-cxx/+/4876/1/src/face-scoped-id.hpp#31
Ideally we should change the return type of registerPrefix and friends to return a (non-scoped) handle directly rather than a weird pointer type. The non-scoped handle type can be implicitly assigned to the scoped handle type. That would substantially improve usability for new API consumers because they don't have to separately construct the scoped handle passing a Face object, which is ugly. Backward compat for the new return type can be achieved by adding a conversion operator from the handle type to the current pointer type.
I agree and this applies to scheduler::ScopedEventId
as well.
Updated by Davide Pesavento about 6 years ago
- Related to Feature #4698: Improve ScopedEventId added
Updated by Junxiao Shi about 6 years ago
- % Done changed from 0 to 10
Change 4876 patchset 2 attempts note-2 design, but it seems that the implicit conversion operator is ineffective:
../src/mgmt/dispatcher.cpp: In member function ‘void ndn::mgmt::Dispatcher::addTopPrefix(const ndn::Name&, bool, const ndn::security::SigningInfo&)’:
../src/mgmt/dispatcher.cpp:82:39: error: no match for ‘operator=’ (operand types are ‘nonstd::optional_lite::optional<const ndn::RegisteredPrefixId*>’ and ‘ndn::RegisteredPrefixHandle’)
Updated by Davide Pesavento about 6 years ago
Junxiao Shi wrote:
Change 4876 patchset 2 attempts note-2 design, but it seems that the implicit conversion operator is ineffective:
Well, it's failing because the LHS is an optional
type... Dispatcher::TopPrefixEntry
is using optional<const RegisteredPrefixId*>
, which is not something I was expecting since it doesn't make much sense (pointers are intrinsically nullable). I would get rid of the optional
and not worry too much about these cases.
Updated by Junxiao Shi almost 6 years ago
- % Done changed from 10 to 50
https://gerrit.named-data.net/5163 implements the same design as scoped Interest filter.
After this is merged, I plan to do another round of refactoring to deprecate conversions of XHandle
to const XId*
.
Updated by Junxiao Shi almost 6 years ago
- % Done changed from 50 to 80
https://gerrit.named-data.net/5198 deprecates Id
types in favor of Handle
types.
NFD and PSync aren't affected.
https://gerrit.named-data.net/5199 updates ndn-tools.
https://gerrit.named-data.net/5200 updates repo-ng.
I will check ChronoSync, NLSR, and NAC later.
Updated by Junxiao Shi over 5 years ago
https://gerrit.named-data.net/5234 https://gerrit.named-data.net/5235 ChronoSync
NLSR is unaffected.
https://gerrit.named-data.net/5236 NAC
Updated by Junxiao Shi over 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
Updated by Davide Pesavento over 5 years ago
- Precedes Task #4885: Remove deprecated const Id* of face-related handles added
Updated by Davide Pesavento over 5 years ago
- Related to Feature #3919: Scoped prefix registration added