[ndnSIM] Setting a custom policy for Content Store

John Baugh jpbaugh at umich.edu
Tue Nov 15 20:44:33 PST 2016

Greetings all,

*See the error(s) I'm getting below from my Google Drive:*

*Here's the code:*



On Mon, Nov 14, 2016 at 3:02 AM, Alex Afanasyev <aa at cs.ucla.edu> wrote:

> Hi John,
> Can you post the exact error you're getting (if it is too long, you can
> use 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/20161115/2f5c56d4/attachment.html>

More information about the ndnSIM mailing list