[vtk-developers] vtkFileOutputWindow syntax

David Cole david.cole at kitware.com
Tue Jun 12 13:25:21 EDT 2012


On Tue, Jun 12, 2012 at 7:35 AM, David Doria <daviddoria at gmail.com> wrote:

> On Tue, Jun 12, 2012 at 7:23 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
>
>> Probably to allow the flexibility of activating it at time different from
>> setting the file name?
>
>
> Even if that is the case, why not just fileOutputWindow->Activate() (with
> no arguments) or something like that? It seems confusing to have to pass an
> object to itself.
>

You're not passing it to itself, you're calling a *static* method to set a
static data member with an instance pointer.

It would be better phrased as:

  vtkOutputWindow::SetInstance(fileOutputWindow);

rather than:

  fileOutputWindow->SetInstance(fileOutputWindow);

because the "class::static_method" phrasing reflects what's actually
happening.




>
> David
>
> _______________________________________________
> 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/20120612/1cb0615b/attachment.html>


More information about the vtk-developers mailing list