On 30/11/10 19:51, Howard Butler wrote:
On Nov 30, 2010, at 11:55 AM, Mateusz Loskot wrote:
On 30/11/10 16:57, Howard Butler wrote:
On Nov 30, 2010, at 9:50 AM, Michael Gerlek wrote:
2. Auto_ptr is used for ReaderImpl and some others. What is
the intent here?
I hope Mateusz can chime in on this one. I never fully
understood the intent here, but I'm kind of a dolt on these
things.
Are you asking why the auto_ptr in particular or why smart pointer
at all?
I was asking about auto_ptr in particular.
Just to clarify, in this particular case, there is nothing wrong
with using std::auto_ptr and rather no chance to get trapped
by its dodgy semantic.
Now I remember that this
existed before I relented on the Boost dependency.
Yes.
My idea was to the make the Reader a ref-counted handle, thus
copyable and assignable. Then factory returns this lightweight
handle. However, the Reader has become fat, then this idea is more
or less blocked.
A poor solution could be to employ boost::shared_ptr<Reader> to
provide the ref-counted lightweight object returned from factory
and passed around, but I don't like such "handle to handle to body"
stack at all, so I've given up.
How much of a diet must liblas::Reader go on?
All data members except the pimpl, the pointer to body,
it is reader/writer implementation.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
_______________________________________________
Liblas-devel mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/liblas-devel