[vtk-developers] Proposed style changes
Glen Lehmann
glehmann at atamai.com
Tue Oct 10 23:28:20 EDT 2006
Hi Francios,
On 10/10/06, François Bertel <francois.bertel at kitware.com> wrote:
> Two remarks:
>
> 1. vtkgl.h is a file generated in the build tree from
> VTK/Utilities/ParseOGLExt/ParseOGLExt.cxx. It is not even in the source
> tree (except if you built VTK in the source tree itself) and does not
> define any class. So ParseOGLExt.cxx has to be changed instead (lines
> 611,612 and 696).
Yup, that's an easy one-liner change.
>
> 2. vtkCocoaGLView.h is an objective C header file.
>
> #import "a.h" is equivalent to
>
> #ifndef __A_H
> # define __A_H
> # include "a.h"
> #endif
>
> I think that's why there is no such #ifndef statement (and also there is
> "@interface vtkCocoaGLView" instead of "class vtkCocoaGLView").
vtkCocoaGLView.mm is an Objective-C++ file and within Xcode, I
typically separate out my vtk pipelines into Objective-C++ files.
Hence, I treat it more like a c++ file than an Objective-C file.
Objective-C++ is a real mixed-bag, though, no matter how you look at
it. I guess the real question is: will this adversely affect any Mac
developers out there?
Cheers,
Glen
>
> I have no objection for the other header files.
>
> Glen Lehmann wrote :
> > Hi All,
> >
> > This may seem a little on the nit-picky side but I would like to
> > propose a few style changes to some of the vtk header files. I have
> > an Xcode project that would be greatly simplified if all of the vtk
> > header files stuck to the following convention:
> >
> > #ifndef __[vtkClassName]_h
> > #define __[vtkClassName]_h
> >
> > class ...
> >
> > #endif
> >
> > The following is a list of header files that deviate from this
> convention:
> >
> > vtkActorCollection.h
> > vtkCocoaGLView.h
> > vtkgl.h
> > vtkGradientFilter.h
> > vtkImageLaplacian.h
> > vtkLightCollection.h
> > vtkMaterialLibrary.h
> > vtkMeshQuality.h
> > vtkMutexLock.h
> > vtkOpenGLExtensionManager.h
> > vtkPointSetSource.h
> > vtkPropCollection.h
> > vtkUnstructuredGridVolumeRayCastIterator.h
> >
> > If there are no objections to these changes, I will commit the fixes
> > tomorrow.
> >
> > Cheers,
> >
> > Glen
>
> --
> François Bertel, PhD | Kitware Inc. Suite 204
> 1 (518) 371 3971 x113 | 28 Corporate Drive
> | Clifton Park NY 12065, USA
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
More information about the vtk-developers
mailing list