A security patch will be applied between 1pm - 1:30pm, (UTC-0400), today- Aug 5th. No downtime is expected, but the site could be slow during that time.

Commit ecbbf7f7 authored by Mark Olesen's avatar Mark Olesen Committed by Brad King
Browse files

Remove vtk(Cxx|Type)RevisionMacro

The CVS $Revision$ keyword replacement will no longer maintain these
macros automatically.  They were used only to implement CollectRevisions
and vtkObjectBase::PrintRevisions, an API that was never used.

Automated as follows:

  pass 0:
  catch templates
  ---------------
  $ git grep 'vtk\(Cxx\|Type\)RevisionMacro' | grep '<'

  pass 1:
  main changes
  ---------------
  $ git grep -l '^vtkCxxRevisionMacro' | while read file; do
    echo "$file" 1>&2
    perl -i -ne 'print unless (/^vtkCxxRevisionMacro/ and /\)/)' $file
  done
  $ git grep -l -e 'vtkTypeRevisionMacro(' | while read file; do
    echo "$file" 1>&2
    perl -i -pe 's/vtkTypeRevisionMacro/vtkTypeMacro/g' $file
  done

  pass 2:
  verify
  ---------------
  $ git grep 'vtk\(Cxx\|Type\)RevisionMacro'

Fixed multi-line vtkCxxRevisionMacro and templates by hand.
parent 1cd36ac0
......@@ -32,7 +32,7 @@
class VTK_CHARTS_EXPORT vtkPen : public vtkObject
{
public:
vtkTypeRevisionMacro(vtkPen, vtkObject);
vtkTypeMacro(vtkPen, vtkObject);
virtual void PrintSelf(ostream &os, vtkIndent indent);
static vtkPen *New();
......
......@@ -26,7 +26,6 @@
#include "vtkStdString.h"
vtkCxxRevisionMacro(vtkPlot, "1.14");
vtkCxxSetObjectMacro(vtkPlot, Selection, vtkIdTypeArray);
vtkCxxSetObjectMacro(vtkPlot, XAxis, vtkAxis);
vtkCxxSetObjectMacro(vtkPlot, YAxis, vtkAxis);
......
......@@ -35,7 +35,7 @@ class vtkVector2f;
class VTK_CHARTS_EXPORT vtkPlot : public vtkContextItem
{
public:
vtkTypeRevisionMacro(vtkPlot, vtkContextItem);
vtkTypeMacro(vtkPlot, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
......
......@@ -33,7 +33,6 @@
#include "vtkstd/vector"
#include "vtkstd/algorithm"
vtkCxxRevisionMacro(vtkPlotBar, "1.7");
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPlotBar);
......
......@@ -32,7 +32,7 @@ class vtkStdString;
class VTK_CHARTS_EXPORT vtkPlotBar : public vtkPlot
{
public:
vtkTypeRevisionMacro(vtkPlotBar, vtkPlot);
vtkTypeMacro(vtkPlotBar, vtkPlot);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
......
......@@ -24,7 +24,6 @@
#include "vtkObjectFactory.h"
//-----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkPlotGrid, "1.5.4.1");
vtkCxxSetObjectMacro(vtkPlotGrid, XAxis, vtkAxis);
vtkCxxSetObjectMacro(vtkPlotGrid, YAxis, vtkAxis);
//-----------------------------------------------------------------------------
......
......@@ -34,7 +34,7 @@ class vtkAxis;
class VTK_CHARTS_EXPORT vtkPlotGrid : public vtkContextItem
{
public:
vtkTypeRevisionMacro(vtkPlotGrid, vtkContextItem);
vtkTypeMacro(vtkPlotGrid, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
......
......@@ -38,7 +38,6 @@
#include "vtkstd/vector"
#include "vtkstd/algorithm"
vtkCxxRevisionMacro(vtkPlotLine, "1.29");
// PIMPL for STL vector...
class vtkPlotLine::VectorPIMPL : public vtkstd::vector<vtkVector2f>
......
......@@ -33,7 +33,7 @@ class vtkImageData;
class VTK_CHARTS_EXPORT vtkPlotLine : public vtkPlot
{
public:
vtkTypeRevisionMacro(vtkPlotLine, vtkPlot);
vtkTypeMacro(vtkPlotLine, vtkPlot);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
......
......@@ -49,7 +49,6 @@ public:
bool SelectionInitialized;
};
vtkCxxRevisionMacro(vtkPlotParallelCoordinates, "1.3");
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPlotParallelCoordinates);
......
......@@ -32,7 +32,7 @@ class vtkStdString;
class VTK_CHARTS_EXPORT vtkPlotParallelCoordinates : public vtkPlot
{
public:
vtkTypeRevisionMacro(vtkPlotParallelCoordinates, vtkPlot);
vtkTypeMacro(vtkPlotParallelCoordinates, vtkPlot);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
......
......@@ -30,7 +30,6 @@
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkPlotPoints, "1.4");
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPlotPoints);
......
......@@ -32,7 +32,7 @@ class vtkStdString;
class VTK_CHARTS_EXPORT vtkPlotPoints : public vtkPlot
{
public:
vtkTypeRevisionMacro(vtkPlotPoints, vtkPlot);
vtkTypeMacro(vtkPlotPoints, vtkPlot);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
......
......@@ -27,7 +27,6 @@
#include "vtkObjectFactory.h"
//-----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkTooltipItem, "1.1");
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkTooltipItem);
......
......@@ -34,7 +34,7 @@ class vtkTextProperty;
class VTK_CHARTS_EXPORT vtkTooltipItem : public vtkContextItem
{
public:
vtkTypeRevisionMacro(vtkTooltipItem, vtkContextItem);
vtkTypeMacro(vtkTooltipItem, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
......
......@@ -32,7 +32,7 @@ public:
{
}
vtkTypeRevisionMacro(vtkTestPoints,vtkPoints);
vtkTypeMacro(vtkTestPoints,vtkPoints);
static vtkTestPoints* New() { return new vtkTestPoints; }
vtkTestPoints() { }
private:
......@@ -40,7 +40,6 @@ private:
void operator=(const vtkTestPoints&);
};
vtkCxxRevisionMacro(vtkTestPoints, "1.24");
class vtkTestPoints2 : public vtkPoints
{
......@@ -50,7 +49,7 @@ public:
}
// Methods from vtkObject
vtkTypeRevisionMacro(vtkTestPoints2,vtkPoints);
vtkTypeMacro(vtkTestPoints2,vtkPoints);
static vtkTestPoints2* New() { return new vtkTestPoints2; }
vtkTestPoints2() { }
private:
......@@ -58,7 +57,6 @@ private:
void operator=(const vtkTestPoints2&);
};
vtkCxxRevisionMacro(vtkTestPoints2, "1.24");
VTK_CREATE_CREATE_FUNCTION(vtkTestPoints);
VTK_CREATE_CREATE_FUNCTION(vtkTestPoints2);
......
......@@ -234,7 +234,7 @@ class TestVTKFiles:
rm = regx.match(line)
if rm:
found = 1
if rm.group(1) != "Revision":
if rm.group(1) == "Revision":
oldlines.append(" %4d: %s" % (cc, line))
cname = rm.group(2)
pname = rm.group(3)
......@@ -249,7 +249,7 @@ class TestVTKFiles:
rm = regx.match(line)
if rm:
found = 1
if rm.group(1) != "Revision":
if rm.group(1) == "Revision":
oldlines.append(" %4d: %s" % (cc, line))
cname = rm.group(2)
pname = rm.group(3)
......@@ -260,19 +260,19 @@ class TestVTKFiles:
self.Print( "File: %s has broken type macro(s):" % self.FileName )
for a in lines:
self.Print( a )
self.Print( "Should be:\n vtkTypeRevisionMacro(%s, %s)" %
self.Print( "Should be:\n vtkTypeMacro(%s, %s)" %
(self.ClassName, self.ParentName) )
self.Error("Broken type macro")
if len(oldlines) > 0:
self.Print( "File: %s has old type macro(s):" % self.FileName )
self.Print( "File: %s has legacy type-revision macro(s):" % self.FileName )
for a in oldlines:
self.Print( a )
self.Print( "Should be:\n vtkTypeRevisionMacro(%s, %s);" %
self.Print( "Should be:\n vtkTypeMacro(%s, %s);" %
(self.ClassName, self.ParentName))
self.Error("Old style type macro")
self.Error("Legacy style type-revision macro")
if not found:
self.Print( "File: %s does not have type macro" % self.FileName )
self.Print( "Should be:\n vtkTypeRevisionMacro(%s, %s);" %
self.Print( "Should be:\n vtkTypeMacro(%s, %s);" %
(self.ClassName, self.ParentName))
self.Error("No type macro")
pass
......
......@@ -45,7 +45,6 @@
# endif
#endif
vtkCxxRevisionMacro(vtkAbstractArray, "1.17");
//----------------------------------------------------------------------------
// Construct object with sane defaults.
......
......@@ -53,7 +53,7 @@ class vtkInformation;
class VTK_COMMON_EXPORT vtkAbstractArray : public vtkObject
{
public:
vtkTypeRevisionMacro(vtkAbstractArray,vtkObject);
vtkTypeMacro(vtkAbstractArray,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -22,7 +22,6 @@
#include "vtkMatrix4x4.h"
#include "vtkPoints.h"
vtkCxxRevisionMacro(vtkAbstractTransform, "1.29");
//----------------------------------------------------------------------------
vtkAbstractTransform::vtkAbstractTransform()
......@@ -366,7 +365,7 @@ void vtkAbstractTransform::UnRegister(vtkObjectBase *o)
class vtkSimpleTransform : public vtkHomogeneousTransform
{
public:
vtkTypeRevisionMacro(vtkSimpleTransform,vtkHomogeneousTransform);
vtkTypeMacro(vtkSimpleTransform,vtkHomogeneousTransform);
static vtkSimpleTransform *New() {
#ifdef VTK_DEBUG_LEAKS
vtkDebugLeaks::ConstructClass("vtkSimpleTransform");
......@@ -380,7 +379,6 @@ protected:
void operator=(const vtkSimpleTransform&);
};
vtkCxxRevisionMacro(vtkSimpleTransform, "1.29");
//----------------------------------------------------------------------------
vtkTransformConcatenation::vtkTransformConcatenation()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment