[vtk-developers] Smart pointer declaration macro?

Stephane PLOIX stephane.ploix at edf.fr
Thu Jan 28 10:24:15 EST 2010


+1 for 
4. Make a new vtkLocalPointer

Stephane




jeff.baumes at kitware.com 
Envoyé par : vtk-developers-bounces at vtk.org
28/01/2010 16:16

A
will.schroeder at kitware.com
cc
vtk-developers at vtk.org, david.gobbi at gmail.com, sebastien.barre at kitware.com
Objet
Re: [vtk-developers] Smart pointer declaration macro?






On Thu, Jan 28, 2010 at 10:00 AM, Will Schroeder
<will.schroeder at kitware.com> wrote:
> Jeff can you summarize the proposed solutions (assuming we think we've
> covered the bases) and let's take a vote on this. I want to keep my 
inbox
> clear :-(

1. Keep things the way they are:
vtkSmartPointer<vtkClass> c = vtkSmartPointer<vtkClass>::New();

2. Add new constructor to vtkSmartPointer that takes a bool and if
true creates an instance of the object. Code would look like:
vtkSmartPointer<vtkClass> c(true);

3. Create typedefs for vtkSmartPointer<vtkClass>:
vtkClassSP c = vtkClassSP::New();

4. Make a new vtkLocalPointer type that is the same as vtkSmartPointer
but always creates an instance of the object.
vtkLocalPointer<vtkClass> c;

Unfortunately our inboxes won't be clear until everyone responds with
a vote (I'd maybe give it till 12pm eastern time). We can take it to
the ARB if there is no clear consensus.

Jeff

>
>
> On Thu, Jan 28, 2010 at 9:58 AM, Sebastien BARRE
> <sebastien.barre at kitware.com> wrote:
>>
>> +1, especially as a foreigner. If you don't speak/read English that 
well,
>> abbreviations are not all that obvious and bring one more mental 
gymnastic
>> to the table, slowing down the whole process of remembering the right
>> name...
>>
>> At 1/28/2010 08:50 AM, Will Schroeder wrote:
>>
>> Sorry, I don't like the abbreviation, I love change :-)
>>
>>
>> On Thu, Jan 28, 2010 at 8:45 AM, Jeff Baumes <jeff.baumes at kitware.com >
>> wrote:
>> On Wed, Jan 27, 2010 at 10:58 AM, Will Schroeder
>> < will.schroeder at kitware.com> wrote:
>> > VTK has a verbose, self documenting style (for better or worse). I'd
>> > like to
>> > stick with it if possible.
>>
>> Will,
>>
>> Are you suggesting no change? Or just that you don't like the
>> abbreviated typedefs like vtkRendererSP?
>>
>> Jeff
>
>
>
> --
> William J. Schroeder, PhD
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> will.schroeder at kitware.com
> http://www.kitware.com
> (518) 881-4902
>
_______________________________________________
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





Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100128/8399a3c4/attachment.html>


More information about the vtk-developers mailing list