[ndnSIM] Setting a custom policy for Content Store

John Baugh jpbaugh at umich.edu
Sun Nov 13 22:53:54 PST 2016


I am trying code like so:

unique_ptr<nfd::cs::Policy> policy(new JPBPolicy());

myContentStore.setPolicy(policy);

I'm getting tons of errors.  It doesn't like any of the conversions I'm
trying to perform...  It may be a misunderstanding of some of the
techniques used with managed/smart pointers in terms of polymorphic
references, but something's not working.

I want to create a subclass of Policy in order to override functions such
as doAfterInsert(iterator i);

In my derived class (subclass), I did provide a body for all the pure
virtual methods from the documentation of Policy.

But I think the problem is the conversion.  Is there some way to do this
with say, static_cast ?

Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161114/26574bc3/attachment.html>


More information about the ndnSIM mailing list