<html><head><meta http-equiv="Content-Type" content="text/html charset=GB2312"><base href="x-msg://1139/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Aaron,</div><div><br></div>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.<div><br></div><div>To iterate over all elements of PIT you can do the following:</div><div><br></div><div>Ptr<ndn::Pit> pit = ?;</div><div>for (Ptr<pit::Entry> entry = pit->Begin (); entry != pit->End (); entry = pit->Next (entry))</div><div>{</div><div>...</div><div>}</div><div><br></div><div>---</div><div>Alex<br><div><br><div><div>On May 9, 2013, at 4:35 PM, aaronishere <<a href="mailto:aaronishere@qq.com">aaronishere@qq.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.5; font-family: Î¢ÈíÑźÚ; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 10px; "><div>Hi, Alex</div><div> </div><div> 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?</div><div> </div><div>Another is how to  loop of all pit-entry, such as</div><div>for ( pitentry::begin, pitentry::end, Next( ) )</div><div>{</div><div>......</div><div>},</div><div>I'm not clear abou it.</div><div> </div><div>Thanks!!</div><div> </div><hr align="left" size="1" style="width: 210px; height: 1px; "><div><span>Aaron</span></div></div></blockquote></div><br></div></div></body></html>