<div dir="ltr">Runtong,<div><br></div><div>I'm new to ndnSIM also, and Spyridon or one of the other more experienced members can correct me if I'm wrong, but in a sample I was working on, this is how I got information from the <b>content store</b>, and I suspect it's <b>similar</b> to the <b>PIT</b>:</div><div><br></div><div>Given a Content Store initialized thusly:</div><div><div><b><font face="monospace, monospace"> //get the content store for the node     </font></b></div><div><b><font face="monospace, monospace">     nfd::Cs& myContentStore = l3->getForwarder()->getCs();</font></b></div></div><div><br></div><div>I iterate through the items:</div><div><br></div><div><div><b><font face="monospace, monospace"> //use iterators to move through the content store</font></b></div><div><b><font face="monospace, monospace">     for(auto it = myContentStore.begin();</font></b></div><div><b><font face="monospace, monospace">         it != myContentStore.end();</font></b></div><div><b><font face="monospace, monospace">         ++it)</font></b></div><div><b><font face="monospace, monospace">     { </font></b></div><div><b><font face="monospace, monospace">        cout<<it->getName()<<endl; //it represents a shared_ptr</font></b></div><div><b><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>                           //to a single Data item</font></b></div><div><b><font face="monospace, monospace">     } </font></b></div></div><div><br></div><div><br></div><div>Hope this is useful to you and others.</div><div><br></div><div>John</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 6, 2016 at 8:23 PM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>the PIT class does not have a getName method. An entry of PIT has a getName method. You can use the iterators to access the entries of PIT (or/and std::find if you want). When you actually get a PIT entry, you can apply the getName method to it (or the methods to get the InRecords and OutRecords).</div><div><br></div><div>Hope that this helps,</div><div><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~<wbr>mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div><div><div class="h5"><div><blockquote type="cite"><div>On Nov 5, 2016, at 4:47 AM, RuntongChen <<a href="mailto:runtongchen@csu.edu.cn" target="_blank">runtongchen@csu.edu.cn</a>> wrote:</div><br class="m_4328448036149090460Apple-interchange-newline"><div><p><font face="宋体">Hello,</font></p><p>Thanks very much for your quick and patient answer both of <span style="float:none;display:inline!important">Spyridon </span>and Junxiao.Based on your guidances,I can get the size of PIT already.But,What I really want is the Name,InRecords and OutRecords.And I find that they are in "nfd::pit::Entry" but not in "nfd::Pit".So,if I follow your advices and call the code of "pit.getName()".Then,The computer will give me the error :"const class nfd::Pit has no number named 'getName'".So,I'd like to know how can I get into "nfd::pit::Entry"and print the "Name" out? </p><p><i>Looking forward to your response.</i></p><p><em>Yours,</em></p><p><em>Runtong</em></p></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br></div>