[vtk-developers] Legacy code instrucmentation
Will Schroeder
will.schroeder at kitware.com
Tue Dec 5 10:30:01 EST 2000
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. (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.
Sometime in the future we'll be able to remove all this junk.
Will
More information about the vtk-developers
mailing list