PacketBase - copy() returning an auto_ptr

Hi Peter, I was trying to do this \todo as you’ve suggested:

Btw. another \todo could be to make copy() return an auto_ptr. This way passing ownership of the object to the caller will be explicit. Changing that should be quite easy thanks to packet generation - we would only need to change the base class, the xsl templates and the one exception we have so far not using packet-gen (QueryHits from Wakingtan’s branch).

and

I’ll probably be able to change the copy() faster but I guess it will be interesting for you to figure out how packet generation works :-). You’ll have to modify PacketHeader.xsl and PacketSource.xsl.

but I’ve ran into many troubles - copy() change is needed not only in the base class/xsl templates, but in many other sources (every copy() must returns auto_ptr ) and I finally haven’t managed to do that, so I think it would be better that you will take a look at it.

Thanks, Petr

Would you like to post a relpy?


This post starts a thread.
Follow-ups:
Re: PacketBase - copy() returning an auto_ptr
Hi Petr, but I’ve ran into many troubles - copy() change is needed not only in the base class/xsl templates, but in many other sources (every copy() must returns auto_ptr ) (more...)