<div dir="auto">Spyros,<div dir="auto"><br></div><div dir="auto">Thanks for the reply.  However I think the problems seems to be that there is apparently nothing in the CS when I go to print it.</div><div dir="auto"><br></div><div dir="auto">It never enters my loops - so it will never print out the information regardless of the printing technique.</div><div dir="auto"><br></div><div dir="auto">My code for custom policy does detect content being inserted (e.g., doAfterInsert is called) and the limit on both Cs and my custom Policy are set to 10.  So I assume it's being added.  So why is it empty by the time I print it out?</div><div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto"><br></div><div dir="auto">JPB</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 9, 2016 11:07 PM, "Spyridon (Spyros) Mastorakis" <<a href="mailto:mastorakis@cs.ucla.edu">mastorakis@cs.ucla.edu</a>> wrote:<br type="attribution"><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 John,<div><br></div><div>I would suggest you either use the NS3 logging statements (e.g., NS_LOG_FUNCTION, <span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;white-space:pre-wrap;background-color:rgb(255,255,255)">NS_LOG_INFO</span>) or the cerr to print out the contents of the CS.</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><blockquote type="cite"><div>On Dec 9, 2016, at 7:51 PM, John Baugh <<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>> wrote:</div><br class="m_-4330376701576946672Apple-interchange-newline"><div><div dir="ltr">ndnSIM friends,<div><br></div><div>At what point is it appropriate to print the contents of the CS?</div><div><br></div><div>I've tried putting some code to print its contents using iterators (e.g., <br><br>for(auto it = theCS.begin(); it != theCS.end(); ++it)<br>{<br>    cout<<it->getName()<<endl;<br>}</div><div><br></div><div>But this doesn't appear to do anything.  I'm currently putting the code after Simulation::Run() and before Simulation::Destroy();</div><div><br></div><div>Is there somewhere else I should be putting it?  I assumed it would print out all the remaining entries by the time the simulation was done running.  I was apparently wrong.</div><div><br></div><div>Note:  I'm not doing anything special in my custom Policy (e.g., I'm not tracking a secondary table of contents yet.)  - but does this even have anything to do with it?  I assume that items are put in the content store regardless.</div><div><br></div><div>Ideas?</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div></div><br></div></blockquote></div><br></div></div></blockquote></div></div>