<div dir="ltr"><div>Hello to all</div><div>I'm trying to modify the pit-entry structure, and i've started with something very simple, just one private integer and two member function (set and get).</div><div><br></div><div>In the pit-entry. hpp i've done this:</div><div>public:</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(212,212,212)">  </span><span style="color:rgb(86,156,214)">public:</span></div><div><span style="color:rgb(86,156,214)">  void</span></div><div><span style="color:rgb(212,212,212)">  </span><span style="color:rgb(220,220,170)">setinteger</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(86,156,214)">int</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(156,220,254)">value</span><span style="color:rgb(212,212,212)">)</span></div><div><span style="color:rgb(212,212,212)">  {</span></div><div><span style="color:rgb(212,212,212)">    m_integer</span><span style="color:rgb(212,212,212)">=</span><span style="color:rgb(212,212,212)">value;</span></div><div><span style="color:rgb(212,212,212)">  }</span></div><br><div><span style="color:rgb(212,212,212)">  </span><span style="color:rgb(86,156,214)">int</span></div><div><span style="color:rgb(212,212,212)">  </span><span style="color:rgb(220,220,170)">getinteger</span><span style="color:rgb(212,212,212)">() </span><span style="color:rgb(86,156,214)">const</span></div><div><span style="color:rgb(212,212,212)">  {</span></div><div><span style="color:rgb(212,212,212)">    </span><span style="color:rgb(197,134,192)">return</span><span style="color:rgb(212,212,212)"> m_integer;</span></div><div><span style="color:rgb(212,212,212)">  }</span></div></div></div><div>and this<br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">private:</span></div><div><span style="color:rgb(212,212,212)">  shared_ptr</span><span style="color:rgb(212,212,212)"><</span><span style="color:rgb(86,156,214)">const</span><span style="color:rgb(212,212,212)"> Interest</span><span style="color:rgb(212,212,212)">></span><span style="color:rgb(212,212,212)"> m_interest;</span></div><div><span style="color:rgb(212,212,212)">  InRecordCollection m_inRecords;</span></div><div><span style="color:rgb(212,212,212)">  OutRecordCollection m_outRecords;</span></div><div><span style="color:rgb(212,212,212)">  </span><span style="color:rgb(78,201,176)">name_tree</span><span style="color:rgb(212,212,212)">::Entry</span><span style="color:rgb(212,212,212)">*</span><span style="color:rgb(212,212,212)"> m_nameTreeEntry;</span></div><div><span style="color:rgb(212,212,212)">  </span><span style="color:rgb(86,156,214)">int</span><span style="color:rgb(212,212,212)"> m_integer;</span></div></div></div><div>also i've modified the constructor to initialize the value, so in the pit-entry.cpp i did this:</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">namespace</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(78,201,176)">nfd</span><span style="color:rgb(212,212,212)"> {</span></div><div><span style="color:rgb(86,156,214)">namespace</span><span style="color:rgb(212,212,212)"> </span><span style="color:rgb(78,201,176)">pit</span><span style="color:rgb(212,212,212)"> {</span></div><br><div><span style="color:rgb(78,201,176)">Entry</span><span style="color:rgb(212,212,212)">::</span><span style="color:rgb(220,220,170)">Entry</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(86,156,214)">const</span><span style="color:rgb(212,212,212)"> Interest</span><span style="color:rgb(212,212,212)">&</span><span style="color:rgb(156,220,254)"> interest</span><span style="color:rgb(212,212,212)">)</span></div><div><span style="color:rgb(212,212,212)">  : </span><span style="color:rgb(220,220,170)">isSatisfied</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(86,156,214)">false</span><span style="color:rgb(212,212,212)">)</span></div><div><span style="color:rgb(212,212,212)">  , </span><span style="color:rgb(220,220,170)">dataFreshnessPeriod</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(181,206,168)">0_ms</span><span style="color:rgb(212,212,212)">)</span></div><div><span style="color:rgb(212,212,212)">  , </span><span style="color:rgb(220,220,170)">m_interest</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(156,220,254)">interest</span><span style="color:rgb(212,212,212)">.</span><span style="color:rgb(220,220,170)">shared_from_this</span><span style="color:rgb(212,212,212)">())</span></div><div><span style="color:rgb(212,212,212)">  , </span><span style="color:rgb(220,220,170)">m_nameTreeEntry</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(86,156,214)">nullptr</span><span style="color:rgb(212,212,212)">)</span></div><div><span style="color:rgb(212,212,212)">  , </span><span style="color:rgb(220,220,170)">m_integer</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(181,206,168)">0</span><span style="color:rgb(212,212,212)">)</span></div><div><span style="color:rgb(212,212,212)">{</span></div><br><div><span style="color:rgb(212,212,212)">}</span></div></div></div><div>like you see, it's a very basic modification, but when i try to call one of those member functions, like, in the MulticastStrategy functions: <br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">void</span></div><div><span style="color:rgb(78,201,176)">MulticastStrategy</span><span style="color:rgb(212,212,212)">::</span><span style="color:rgb(220,220,170)">afterReceiveInterest</span><span style="color:rgb(212,212,212)">(</span><span style="color:rgb(86,156,214)">const</span><span style="color:rgb(212,212,212)"> Face</span><span style="color:rgb(212,212,212)">&</span><span style="color:rgb(156,220,254)"> inFace</span><span style="color:rgb(212,212,212)">, </span><span style="color:rgb(86,156,214)">const</span><span style="color:rgb(212,212,212)"> Interest</span><span style="color:rgb(212,212,212)">&</span><span style="color:rgb(156,220,254)"> interest</span><span style="color:rgb(212,212,212)">,</span></div><div><span style="color:rgb(212,212,212)">                                        </span><span style="color:rgb(86,156,214)">const</span><span style="color:rgb(212,212,212)"> shared_ptr</span><span style="color:rgb(212,212,212)"><</span><span style="color:rgb(78,201,176)">pit</span><span style="color:rgb(212,212,212)">::Entry</span><span style="color:rgb(212,212,212)">>&</span><span style="color:rgb(156,220,254)"> pitEntry</span><span style="color:rgb(212,212,212)">)</span></div><div><span style="color:rgb(212,212,212)">{</span></div><div><span style="color:rgb(212,212,212)">   <br></span><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(212,212,212)">            </span><span style="color:rgb(156,220,254)">pitEntry</span><span style="color:rgb(212,212,212)">.</span><span style="color:rgb(156,220,254)">m_integer</span><span style="color:rgb(212,212,212)">=</span><span style="color:rgb(181,206,168)">100</span><span style="color:rgb(212,212,212)">;</span></div><div><span style="color:rgb(212,212,212)"><br></span></div></div></div><div><span style="color:rgb(212,212,212)"><br></span></div></div></div><div>I get this error message : <br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div>[2365/3208] Compiling src/ndnSIM/NFD/daemon/fw/multicast-strategy.cpp<br>../src/ndnSIM/NFD/daemon/fw/multicast-strategy.cpp: In member function ‘virtual void nfd::fw::MulticastStrategy::afterReceiveInterest(const nfd::face::Face&, const ndn::Interest&, const std::shared_ptr<nfd::pit::Entry>&)’:<br>../src/ndnSIM/NFD/daemon/fw/multicast-strategy.cpp:122:22: error: ‘const class std::shared_ptr<nfd::pit::Entry>’ has no member named ‘setinteger’<br>             pitEntry.setinteger(100);<br>                      ^<br></div></div></div><div><br></div><div>If anyone can help, i would be very grateful.</div><div>thanks in advance<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>