alexander.afanasyev at ucla.edu
Thu May 9 16:42:39 PDT 2013
It is almost impossible to get a position number of an item, since the PIT data structure is a recursive hash-based container. Is there any specific use case why you want to get this number? If you really need such functionality, the custom PIT policy can track PIT item positions.
To iterate over all elements of PIT you can do the following:
Ptr<ndn::Pit> pit = ?;
for (Ptr<pit::Entry> entry = pit->Begin (); entry != pit->End (); entry = pit->Next (entry))
On May 9, 2013, at 4:35 PM, aaronishere <aaronishere at qq.com> wrote:
> Hi, Alex
> Is there some way to get the position number of item in the *-policy.h, such as the lookuped item is the 5th item in the container?
> Another is how to loop of all pit-entry, such as
> for ( pitentry::begin, pitentry::end, Next( ) )
> I'm not clear abou it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM