[vtk-developers] RFC: vtkScopedPointer - a new hope?

Karthik Krishnan karthik.krishnan at kitware.com
Mon Jan 31 10:23:42 EST 2011


Dear Marcus:

Sorry for the late comments on the naming convention..

Despite its verbosity, I like the older name (vtkScopedPointer),
specifically the "Pointer" fragment. The Scoped fragment is open to
discussion.

Its has a naming convention and its easy to explain to someone. We have a
vtkWeakPointer, vtkSmartPointer, vtkScopedPointer.  Just like we use Reader,
Writer, Mapper, Actor, Widget, Data suffixes, it seems appropriate to have
the "Pointer" suffix here.

Thanks
--
karthik

On Wed, Jan 26, 2011 at 8:10 PM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:

> I just merged the vtkNew topic branch. I will keep an eye on the
> dashboards. Personally, I think it is a good addition but due to VTK's
> API (largely passing pointers around as function arguments) I can see
> some motivation (and precedent from vtkSmartPointer) for opening up
> the API later. This is totally possible should there be motivation to
> do so.
>
> There are a few ideas I have to make it more useful in the future, but
> I think even in its current form it should enable us to write more
> concise, readable code. Let me know if there is anything I missed, I
> am very tempted to add a Get() method that returns the pointer, in
> addition to the more standard GetPointer() for example.
>
> Thanks for all of the comments and feedback.
>
> Marcus
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110131/c09e5eaf/attachment.html>


More information about the vtk-developers mailing list