[Liblas-devel] Design/architecture questions
Howard Butler
hobu.inc at gmail.com
Tue Nov 30 14:51:39 EST 2010
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. Now I remember that this existed before I relented on the Boost dependency. So glad for Boost now though. So glad :)
>
> 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? I think I can remove the reprojection-related things (in SRS, out SRS, transform, etc). Filtering and Transformation can be moved up the tree into a subclass or polymorphic that acts as a container and applies those operations via visitor or something. Would that get us thin enough?
More information about the Liblas-devel
mailing list