<div dir="auto">Have you tried:<div dir="auto"><br></div><div dir="auto">this->getObject<Node>()</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jun 3, 2017 9:12 AM, "Mateus Sousa" <<a href="mailto:mateus.aluufc@gmail.com">mateus.aluufc@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi, <br><br></div>I'm stuck on the following problem:<br></div>I'm creating a new forwarding method and I need to get the node's object to make some decisions. My method seems much like this (multicast-strategy.cpp):<br><br>#include "multicast-strategy.hpp"<br>#include "algorithm.hpp"<br><br>namespace nfd {<br>namespace fw {<br><br>const Name MulticastStrategy::STRATEGY_<wbr>NAME("ndn:/localhost/nfd/<wbr>strategy/multicast/%FD%01");<br>NFD_REGISTER_STRATEGY(<wbr>MulticastStrategy);<br><br>MulticastStrategy::<wbr>MulticastStrategy(Forwarder& forwarder, const Name& name)<br>  : Strategy(forwarder, name)<br>{<br>}<br><br>void<br>MulticastStrategy::<wbr>afterReceiveInterest(const Face& inFace, const Interest& interest,<br>                              <wbr>          const shared_ptr<pit::Entry>& pitEntry)<br>{<br>  const fib::Entry& fibEntry = this->lookupFib(*pitEntry);<br>  const fib::NextHopList& nexthops = fibEntry.getNextHops();<br><br>  for (fib::NextHopList::const_<wbr>iterator it = nexthops.begin(); it != nexthops.end(); ++it) {<br>    Face& outFace = it->getFace();<br>    if (!wouldViolateScope(inFace, interest, outFace) &&<br>        canForwardToLegacy(*pitEntry, outFace)) {<br>      this->sendInterest(pitEntry, outFace, interest);<br>    }<br>  }<br><br>  if (!hasPendingOutRecords(*<wbr>pitEntry)) {<br>    this->rejectPendingInterest(<wbr>pitEntry);<br>  }<br>}<br><br>} // namespace fw<br>} // namespace nfd<br><br></div>I need a way to return the node's object or the node's ID. <br><br></div>Thanks in advance.<br></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></div>