[ndnSIM] Setting a custom policy for Content Store

Alex Afanasyev aa at CS.UCLA.EDU
Mon Nov 14 00:02:44 PST 2016


Hi John,

Can you post the exact error you're getting (if it is too long, you can use pastebin.com <http://pastebin.com/>).  If you also can share the snippet that reproduces the problem, it would be much faster to debug the issue and suggest the solution.

--
Alex

> On Nov 14, 2016, at 3:53 PM, John Baugh <jpbaugh at umich.edu> wrote:
> 
> 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/6c00e3c1/attachment.html>


More information about the ndnSIM mailing list