[vtk-developers] Marching towards vtk3.2; legacy code issues

Will Schroeder will.schroeder at kitware.com
Wed Dec 6 11:51:59 EST 2000


I have marked the native windowing classes for deprecation according to the
method described below. We (talking with Bill & Ken) decided to leave the
native classes in since there are several Qt users depending on them. Once
the release is cut, the plan is to (soon thereafter) remove all obsolete code
in the nightlies.
Will



>Hi Folks-
>
>
>In a short while I'll be checking in many classes that have been
>modified to indicate legacy code. The code (from vtkCutter.h)
>typically looks like this:
>
>
>#ifndef VTK_REMOVE_LEGACY_CODE
>   // Description:
>   // For legacy compatibility. Do not use.
>   void SetLocator(vtkPointLocator& locator)
>     {VTK_LEGACY_METHOD(SetLocator,"3.2"); this->SetLocator(&locator);}
>#endif
>
>What this means is that we can compile-time check the use of legacy code,
>as well as run-time check with an error message printed out. (Notes: 
>compile-time
>checking only works for C++, the wrapping is a problem because the wrapper 
>does
>not know to skip the code in #define VTK_LEGACY_METHOD ... #endif
>The VTK_LEGACY_METHOD macro looks like:
>
>#ifdef VTK_LEAN_AND_MEAN
>#define VTK_LEGACY_METHOD(oldMethod,versionStringMadeLegacy) \
>   vtkErrorMacro(<< #oldMethod \
>                 << " was obsoleted for version " << 
> #versionStringMadeLegacy \
>                 << " and will be removed in a future version");
>#else
>#define VTK_LEGACY_METHOD(oldMethod,versionStringMadeLegacy)
>#endif
>
>If anyone has any comments or concerns please let me know. Otherwise I'll 
>do this
>sometime in the next day or two.
>
>Also, I can use some help: David- there are a lot of obsoleted methods in the
>transformation stuff that I may have missed, you might want to check things
>over once I check everything in. Other folks may want to do the same.





More information about the vtk-developers mailing list