Commit 55878a23 authored by Sean McBride's avatar Sean McBride

Manual search & destroy of (B|E)TX

First automatically removed lines with only BTX/ETX
from .h files with the following regexes:

^ *// *BTX\r
^ *// *ETX\r

and replaced occurances with nothing. Committed that, then manually
removed various remaining cases of BTX/ETX, and related comments, and parsing stuff,
then trashed the first commit.
parent 61b32016
Pipeline #14738 passed with stage
......@@ -455,9 +455,6 @@ set(VTK_PYTHON_VERSION 2 CACHE STRING
# Add the option for build the Python wrapping to VTK.
option(VTK_WRAP_JAVA "Should VTK Java wrapping be built?" OFF)
# FIXME: This variable should not be necessary once we are done
set(VTK_IGNORE_BTX ON CACHE INTERNAL "VTK modular always ignores BTX")
# Force reset of hints file location in cache if it was moved
if(VTK_WRAP_HINTS)
if(NOT EXISTS ${VTK_WRAP_HINTS})
......
......@@ -9,7 +9,6 @@ vtk_add_test_python(
TestEnums.py
TestExecuteMethodFinalizeCrash.py
TestGhost.py
TestIgnoreBTX.py
TestMutable.py
TestNumpySupport.py
TestNumpyInterface.py
......
"""Test VTK_IGNORE_BTX setting to ensure that it is ON
"""
import sys
import vtk
from vtk.test import Testing
class TestIgnoreBTX(Testing.vtkTest):
def testIgnoreBTX(self):
"""Try to call a method that is BTX'd, to ensure VTK_IGNORE_BTX=ON
"""
stringArray = vtk.vtkStringArray()
information = vtk.vtkInformation()
stringArray.CopyInformation(information, 0)
if __name__ == "__main__":
Testing.main([(TestIgnoreBTX, 'test')])
......@@ -4,7 +4,6 @@ vtk_add_test_tcl(
# TestEmptyInput.tcl
# TestSetGet.tcl
TestString.tcl
TestIgnoreBTX.tcl
otherInterp.tcl
otherPrint.tcl
)
for {set i 0} {$i < [expr $argc - 1]} {incr i} {
if {[lindex $argv $i] == "-A"} {
set auto_path "$auto_path [lindex $argv [expr $i +1]]"
}
}
package require vtk
# A simple test to see if BTX'd methods are available
proc rtOtherTest { fileid } {
vtkStringArray stringArray
vtkInformation information
if {[catch {stringArray CopyInformation information 0}] == 0} {
puts "VTK_IGNORE_BTX=ON test succeeded"
} else {
puts stderr "VTK_IGNORE_BTX=ON test failed"
exit 1
}
}
# All tests should end with the following...
rtOtherTest stdout
exit
......@@ -31,7 +31,6 @@
#include "vtkCommonCoreModule.h" // For export macro
#include "vtkObject.h"
//BTX - begin tcl exclude
class vtkCollectionElement //;prevents pick-up by man page generator
{
public:
......@@ -40,7 +39,6 @@ class vtkCollectionElement //;prevents pick-up by man page generator
vtkCollectionElement *Next;
};
typedef void * vtkCollectionSimpleIterator;
//ETX end tcl exclude
class vtkCollectionIterator;
......
......@@ -22,11 +22,9 @@
// When deriving a class from vtkAbstractCellLocator, one should include the
// 'hidden' member functions by the following construct in the derived class
// \verbatim
// //BTX
// using vtkAbstractCellLocator::IntersectWithLine;
// using vtkAbstractCellLocator::FindClosestPoint;
// using vtkAbstractCellLocator::FindClosestPointWithinRadius;
// //ETX
// \endverbatim
//
......@@ -259,9 +257,7 @@ protected:
int LazyEvaluation;
int UseExistingSearchStructure;
vtkGenericCell *GenericCell;
//BTX - begin tcl exclude
double (*CellBounds)[6];
//ETX - end tcl exclude
private:
vtkAbstractCellLocator(const vtkAbstractCellLocator&); // Not implemented.
......
......@@ -279,8 +279,6 @@ protected:
//
// Special classes for manipulating data
//
//BTX - begin tcl exclude
//
// Special structures for building loops
class LocalVertex
{
......@@ -340,8 +338,6 @@ protected:
LocalTri *Array; // pointer to data
vtkIdType MaxId; // maximum index inserted thus far
};
//ETX - end tcl exclude
//
private:
void InitializeQueue(vtkIdType numPts);
......
......@@ -212,8 +212,6 @@ protected:
//
// Special classes for manipulating data
//
//BTX - begin tcl exclude
//
class StreamPoint {
public:
double x[3]; // position
......
......@@ -28,7 +28,7 @@ vtkStandardNewMacro(vtkHyperStreamline);
//
// Special classes for manipulating data
//BTX
//
class vtkHyperPoint { //;prevent man page generation
public:
vtkHyperPoint(); // method sets up storage
......@@ -46,7 +46,6 @@ public:
double S; // scalar value
double D; // distance travelled so far
};
//ETX
class vtkHyperArray { //;prevent man page generation
public:
......
......@@ -31,7 +31,7 @@ vtkStandardNewMacro(vtkUncertaintyTubeFilter);
//
// Special classes for manipulating data
//BTX
//
class vtkTubePoint { //;prevent man page generation
public:
vtkTubePoint(); // method sets up storage
......@@ -44,7 +44,6 @@ public:
double V2[3]; // another, orthogonal normal to the line
double Vector[3];//local uncertainty vector
};
//ETX
class vtkTubeArray { //;prevent man page generation
public:
......
......@@ -60,9 +60,7 @@ public:
// Save the range of valid timestep index values.
vtkGetVector2Macro(TimeStepRange, int);
//BTX
// void GetTimeStepValues(std::vector<double> &steps);
//ETX
protected:
vtkTemporalSphereSource();
......
......@@ -109,7 +109,6 @@ protected:
static void MoveAction(vtkAbstractWidget*);
static void TimerAction(vtkAbstractWidget*);
//BTX - manage the state of the widget
int WidgetState;
enum _WidgetState
{
......
......@@ -35,8 +35,6 @@ class vtkImageData;
//
// Special classes for manipulating data
//
//BTX - begin tcl exclude
//
// For the breadth first search
class vtkImageConnectorSeed { //;prevent man page generation
public:
......@@ -45,8 +43,6 @@ public:
int Index[3];
vtkImageConnectorSeed *Next;
};
//ETX - end tcl exclude
//
class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageConnector : public vtkObject
......
......@@ -727,5 +727,3 @@ ymax
ymin
zmax
zmin
ETX
BTX
\ No newline at end of file
......@@ -89,10 +89,8 @@ of whether windows.h has been included before it:
#ifdef VTK_WORKAROUND_WINDOWS_MANGLE
# undef GetClassNameW
# undef GetClassNameA
//BTX
const char* GetClassNameA() const;
const char* GetClassNameW() const;
//ETX
#endif
The method GetClassName has three cases. If windows.h is not included
......@@ -103,9 +101,7 @@ preprocessor will not recursively expand a macro, so replacement stops
there and the GetClassName method is declared. When UNICODE is
defined the same process occurs but through GetClassNameW instead.
The methods GetClassNameA and GetClassNameW are not mangled so they
can be provided directly. They are surrounded by a BTX/ETX pair
because they should not be wrapped since scripting language code will
not be mangled by windows.h.
can be provided directly.
Now that all three names are provided we can address the fact that
GetClassName is supposed to be a virtual function. When a subclass
......
......@@ -2305,16 +2305,10 @@ YY_RULE_SETUP
case 4:
YY_RULE_SETUP
{
if (!IgnoreBTX) {
skip_ahead_until("//ETX");
}
}
YY_BREAK
case 5:
YY_RULE_SETUP
/* eat mismatched ETX */
YY_BREAK
case 6:
YY_RULE_SETUP
......
......@@ -49,11 +49,6 @@ void vtkParse_IncludeDirectory(const char *dirname);
*/
const char *vtkParse_FindIncludeFile(const char *filename);
/**
* Ignore BTX/ETX markers
*/
void vtkParse_SetIgnoreBTX(int option);
/**
* Set the command name, for error reporting and diagnostics.
*/
......
......@@ -99,14 +99,6 @@ ID [a-zA-Z_\x80-\xff][0-9a-zA-Z_\x80-\xff]*
"/*" { skip_comment(); }
^[\t ]*"//BTX".* {
if (!IgnoreBTX) {
skip_ahead_until("//ETX");
}
}
^[\t ]*"//ETX".* /* eat mismatched ETX */
^[\t ]*("@interface"|"@implementation") {
skip_ahead_until("@end");
}
......
......@@ -241,7 +241,6 @@ int NumberOfDefinitions = 0;
const char **Definitions;
/* options that can be set by the programs that use the parser */
int IgnoreBTX = 0;
int Recursive = 0;
const char *CommandName = NULL;
......@@ -12397,19 +12396,6 @@ void outputGetVectorMacro(const char *var, unsigned int paramType,
output_function();
}
/* Set a flag to ignore BTX/ETX markers in the files */
void vtkParse_SetIgnoreBTX(int option)
{
if (option)
{
IgnoreBTX = 1;
}
else
{
IgnoreBTX = 0;
}
}
/* Set a flag to recurse into included files */
void vtkParse_SetRecursive(int option)
{
......
......@@ -202,7 +202,6 @@ int NumberOfDefinitions = 0;
const char **Definitions;
/* options that can be set by the programs that use the parser */
int IgnoreBTX = 0;
int Recursive = 0;
const char *CommandName = NULL;
......@@ -4974,19 +4973,6 @@ void outputGetVectorMacro(const char *var, unsigned int paramType,
output_function();
}
/* Set a flag to ignore BTX/ETX markers in the files */
void vtkParse_SetIgnoreBTX(int option)
{
if (option)
{
IgnoreBTX = 1;
}
else
{
IgnoreBTX = 0;
}
}
/* Set a flag to recurse into included files */
void vtkParse_SetRecursive(int option)
{
......
......@@ -456,13 +456,6 @@ FileInfo *vtkParse_Main(int argc, char *argv[])
exit(1);
}
/* if a hierarchy is was given, then BTX/ETX can be ignored */
vtkParse_SetIgnoreBTX(0);
if (options.HierarchyFileNames)
{
vtkParse_SetIgnoreBTX(1);
}
/* parse the input file */
data = vtkParse_ParseFile(options.InputFileName, ifile, stderr);
......
......@@ -576,9 +576,6 @@ static char **vtkWrapHierarchy_ParseHeaderFile(
lines[0] = NULL;
}
/* always ignore BTX markers when building hierarchy files */
vtkParse_SetIgnoreBTX(1);
/* the "concrete" flag doesn't matter, just set to zero */
data = vtkParse_ParseFile(filename, fp, stderr);
......
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