[vtk-developers] Variable naming
Dean Inglis
dean.inglis at on.aibn.com
Fri Apr 26 14:41:10 EDT 2002
Prabhu,
> I think you should also avoid naming a variable something like
> RestrictPlaneToVolume. If you look at all the other vtk classes they
> usually have methods something like this:
>
> SetVariable(<whatever>)
> GetVariable()
> SetVariableToState1()
> SetVariableToState2()
> SetVariableToState3()
>
> So if you call the 'Variable' itself 'VariableToState' then any
> automatic parser like some of my vtkMethodParser/pipeline browser/test
> code or maybe even the Set/Get testers will get confused. So I think
> its best to avoid such names for the sake of consistency.
>
> Maybe you should call the variable RestrictPlaneInVolume or something.
I agree and will change this next week when everything is green again. As
Will sugggested, I am adding this to a growing list of developer's tips that
will hopefully one day enhance the vtk Coding Standards FAQ.
Dean
More information about the vtk-developers
mailing list