Feature #3146
closed
Face::getTransport method
Added by Alex Afanasyev about 9 years ago.
Updated almost 9 years ago.
Description
In several instances (DummyFace, InternalClientFace), it is necessary to access the underlying Transport class. The current workaround includes creating helper functions. With Face::getTransport, helper functions no longer be necessary.
Both DummyFace
and InternalClientFace
are subclasses of ndn::Face
, so getTransport
should be declared as protected.
- Subject changed from Add Face::getTransport method to Face::getTransport method
- Estimated time set to 1.50 h
- Target version set to v0.5
- Status changed from New to In Progress
- Assignee set to Alex Afanasyev
After having Face::getTransport
, makeDummyClientFace
should be deprecated (with Doxygen only for now) and make_shared<DummyClientFace>
should work.
Is it necessary for a caller of Face::getTransport
to obtain shared ownership of Transport
?
If there isn't such a use case, it's better to return a mutable reference, so that we could use unique_ptr<Transport>
in the future without affecting this API.
- Blocks Bug #3383: Deprecated makeDummyClientFace usage added
- Status changed from In Progress to Closed
- Target version changed from v0.5 to v0.4
- % Done changed from 0 to 100
Also available in: Atom
PDF