<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Yifeng,</div><div><br></div><div>PerOutFaceLimits is a templated class and you can define (almost) any Parent class that PerOutFaceLimits is extending.  Examples of these are in model/fw/per-out-face-limits.cc file: </div><div><br></div><div><div>template class PerOutFaceLimits<BestRoute>;</div><div>typedef PerOutFaceLimits<BestRoute> PerOutFaceLimitsBestRoute;</div><div>NS_OBJECT_ENSURE_REGISTERED (PerOutFaceLimitsBestRoute);</div></div><div><br></div><div><br></div><div>If you want to extend the limits class, you have several options.  You can do it in a templated way:</div><div><br></div><div>template<class Parent></div><div>class Extension : public PerOutFaceLimits<Parent></div><div>...</div><div><br></div><div>or you if you know what is the base strategy you want to use with limiting, you can just specialize your extension:</div><div><br></div><div>class Extension : public PerOutFaceLimits<BestRoute></div><div>...</div><div><br></div><div><br></div><div>If the parent class that you're using is inherited from Nacks class (most of the strategies do: <a href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_forwarding_strategy.html">http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_forwarding_strategy.html</a>), then you can directly override any method defined in Nacks class in your extension.   That is, in one extension class you can combine modifications for limits and nacks.</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Feb 20, 2013, at 6:19 AM, Yifeng Li <<a href="mailto:yifengl@email.arizona.edu">yifengl@email.arizona.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello Alex,<br><br>I noticed per-out-face-limits extend Parent, where is Parent defined? I also, if I extend per out face limits, do I also have to extend Nacks as well? There seems to be inheritance conflicts if I extend both.<br>
<br>Thanks for your help,<br>Yifeng<br></blockquote></div><br></body></html>