Commit f9b2eeb1 authored by Sean McBride's avatar Sean McBride

Replaced many int with vtkTypeBool

For now, vtkTypeBool is just a typedef for int, but one day it can become a real bool.

Found with a regex:

vtkBooleanMacro.*int\)
parent 620affe1
...@@ -56,9 +56,9 @@ public: ...@@ -56,9 +56,9 @@ public:
* Turns on buffer flushing for the output * Turns on buffer flushing for the output
* to the log file. * to the log file.
*/ */
vtkSetMacro(Flush, int); vtkSetMacro(Flush, vtkTypeBool);
vtkGetMacro(Flush, int); vtkGetMacro(Flush, vtkTypeBool);
vtkBooleanMacro(Flush, int); vtkBooleanMacro(Flush, vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -68,9 +68,9 @@ public: ...@@ -68,9 +68,9 @@ public:
* it will be overwritten each time the vtkFileOutputWindow * it will be overwritten each time the vtkFileOutputWindow
* is created. * is created.
*/ */
vtkSetMacro(Append, int); vtkSetMacro(Append, vtkTypeBool);
vtkGetMacro(Append, int); vtkGetMacro(Append, vtkTypeBool);
vtkBooleanMacro(Append, int); vtkBooleanMacro(Append, vtkTypeBool);
//@} //@}
protected: protected:
...@@ -80,8 +80,8 @@ protected: ...@@ -80,8 +80,8 @@ protected:
char* FileName; char* FileName;
ofstream* OStream; ofstream* OStream;
int Flush; vtkTypeBool Flush;
int Append; vtkTypeBool Append;
private: private:
vtkFileOutputWindow(const vtkFileOutputWindow&) = delete; vtkFileOutputWindow(const vtkFileOutputWindow&) = delete;
......
...@@ -360,9 +360,9 @@ public: ...@@ -360,9 +360,9 @@ public:
* When categorical data is present, only values in the lookup table will be * When categorical data is present, only values in the lookup table will be
* considered valid; all other values will be assigned \a NanColor. * considered valid; all other values will be assigned \a NanColor.
*/ */
vtkSetMacro(IndexedLookup,int); vtkSetMacro(IndexedLookup,vtkTypeBool);
vtkGetMacro(IndexedLookup,int); vtkGetMacro(IndexedLookup,vtkTypeBool);
vtkBooleanMacro(IndexedLookup,int); vtkBooleanMacro(IndexedLookup,vtkTypeBool);
//@} //@}
...@@ -442,7 +442,7 @@ protected: ...@@ -442,7 +442,7 @@ protected:
class vtkInternalAnnotatedValueMap; class vtkInternalAnnotatedValueMap;
vtkInternalAnnotatedValueMap* AnnotatedValueMap; vtkInternalAnnotatedValueMap* AnnotatedValueMap;
int IndexedLookup; vtkTypeBool IndexedLookup;
double Alpha; double Alpha;
......
...@@ -88,9 +88,9 @@ public: ...@@ -88,9 +88,9 @@ public:
/** /**
* Keep track of whether the rendering window has been mapped to screen. * Keep track of whether the rendering window has been mapped to screen.
*/ */
vtkSetMacro(Mapped,int); vtkSetMacro(Mapped,vtkTypeBool);
vtkGetMacro(Mapped,int); vtkGetMacro(Mapped,vtkTypeBool);
vtkBooleanMacro(Mapped,int); vtkBooleanMacro(Mapped,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -100,18 +100,18 @@ public: ...@@ -100,18 +100,18 @@ public:
* buffering off or make use of the SwapBuffers methods to prevent * buffering off or make use of the SwapBuffers methods to prevent
* you from swapping buffers between exposures. * you from swapping buffers between exposures.
*/ */
vtkSetMacro(Erase,int); vtkSetMacro(Erase,vtkTypeBool);
vtkGetMacro(Erase,int); vtkGetMacro(Erase,vtkTypeBool);
vtkBooleanMacro(Erase,int); vtkBooleanMacro(Erase,vtkTypeBool);
//@} //@}
//@{ //@{
/** /**
* Keep track of whether double buffering is on or off * Keep track of whether double buffering is on or off
*/ */
vtkSetMacro(DoubleBuffer,int); vtkSetMacro(DoubleBuffer,vtkTypeBool);
vtkGetMacro(DoubleBuffer,int); vtkGetMacro(DoubleBuffer,vtkTypeBool);
vtkBooleanMacro(DoubleBuffer,int); vtkBooleanMacro(DoubleBuffer,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -170,9 +170,9 @@ public: ...@@ -170,9 +170,9 @@ public:
* supported for every type of window and on some windows you may need to * supported for every type of window and on some windows you may need to
* invoke this prior to the first render. * invoke this prior to the first render.
*/ */
vtkSetMacro(OffScreenRendering,int); vtkSetMacro(OffScreenRendering,vtkTypeBool);
vtkGetMacro(OffScreenRendering,int); vtkGetMacro(OffScreenRendering,vtkTypeBool);
vtkBooleanMacro(OffScreenRendering,int); vtkBooleanMacro(OffScreenRendering,vtkTypeBool);
//@} //@}
/** /**
...@@ -196,16 +196,16 @@ public: ...@@ -196,16 +196,16 @@ public:
//@} //@}
protected: protected:
int OffScreenRendering; vtkTypeBool OffScreenRendering;
vtkWindow(); vtkWindow();
~vtkWindow() override; ~vtkWindow() override;
char *WindowName; char *WindowName;
int Size[2]; int Size[2];
int Position[2]; int Position[2];
int Mapped; vtkTypeBool Mapped;
int Erase; vtkTypeBool Erase;
int DoubleBuffer; vtkTypeBool DoubleBuffer;
int DPI; int DPI;
double TileViewport[4]; double TileViewport[4];
......
...@@ -70,9 +70,9 @@ public: ...@@ -70,9 +70,9 @@ public:
* won't cause disk caching (24 extra bytes per cell are required to * won't cause disk caching (24 extra bytes per cell are required to
* save the bounds). * save the bounds).
*/ */
vtkSetMacro(CacheCellBounds,int); vtkSetMacro(CacheCellBounds,vtkTypeBool);
vtkGetMacro(CacheCellBounds,int); vtkGetMacro(CacheCellBounds,vtkTypeBool);
vtkBooleanMacro(CacheCellBounds,int); vtkBooleanMacro(CacheCellBounds,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -81,9 +81,9 @@ public: ...@@ -81,9 +81,9 @@ public:
* not applicable to all implementations, but if the locator is being used * not applicable to all implementations, but if the locator is being used
* as a geometry simplification technique, there is no need to keep them. * as a geometry simplification technique, there is no need to keep them.
*/ */
vtkSetMacro(RetainCellLists,int); vtkSetMacro(RetainCellLists,vtkTypeBool);
vtkGetMacro(RetainCellLists,int); vtkGetMacro(RetainCellLists,vtkTypeBool);
vtkBooleanMacro(RetainCellLists,int); vtkBooleanMacro(RetainCellLists,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -93,9 +93,9 @@ public: ...@@ -93,9 +93,9 @@ public:
* If LazyEvaluation is supported, this turns on/off the feature. * If LazyEvaluation is supported, this turns on/off the feature.
* if not supported, it is ignored. * if not supported, it is ignored.
*/ */
vtkSetMacro(LazyEvaluation,int); vtkSetMacro(LazyEvaluation,vtkTypeBool);
vtkGetMacro(LazyEvaluation,int); vtkGetMacro(LazyEvaluation,vtkTypeBool);
vtkBooleanMacro(LazyEvaluation,int); vtkBooleanMacro(LazyEvaluation,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -106,9 +106,9 @@ public: ...@@ -106,9 +106,9 @@ public:
* Turning on this flag enables some locators to skip the rebuilding * Turning on this flag enables some locators to skip the rebuilding
* phase * phase
*/ */
vtkSetMacro(UseExistingSearchStructure,int); vtkSetMacro(UseExistingSearchStructure,vtkTypeBool);
vtkGetMacro(UseExistingSearchStructure,int); vtkGetMacro(UseExistingSearchStructure,vtkTypeBool);
vtkBooleanMacro(UseExistingSearchStructure,int); vtkBooleanMacro(UseExistingSearchStructure,vtkTypeBool);
//@} //@}
/** /**
...@@ -287,10 +287,10 @@ protected: ...@@ -287,10 +287,10 @@ protected:
//@} //@}
int NumberOfCellsPerNode; int NumberOfCellsPerNode;
int RetainCellLists; vtkTypeBool RetainCellLists;
int CacheCellBounds; vtkTypeBool CacheCellBounds;
int LazyEvaluation; vtkTypeBool LazyEvaluation;
int UseExistingSearchStructure; vtkTypeBool UseExistingSearchStructure;
vtkGenericCell *GenericCell; vtkGenericCell *GenericCell;
double (*CellBounds)[6]; double (*CellBounds)[6];
......
...@@ -98,9 +98,9 @@ public: ...@@ -98,9 +98,9 @@ public:
* If SkipEmptyNodes is true, then nullptr datasets will be skipped. Default is * If SkipEmptyNodes is true, then nullptr datasets will be skipped. Default is
* true. * true.
*/ */
vtkSetMacro(SkipEmptyNodes, int); vtkSetMacro(SkipEmptyNodes, vtkTypeBool);
vtkGetMacro(SkipEmptyNodes, int); vtkGetMacro(SkipEmptyNodes, vtkTypeBool);
vtkBooleanMacro(SkipEmptyNodes, int); vtkBooleanMacro(SkipEmptyNodes, vtkTypeBool);
//@} //@}
/** /**
...@@ -118,7 +118,7 @@ public: ...@@ -118,7 +118,7 @@ public:
protected: protected:
vtkCompositeDataIterator(); vtkCompositeDataIterator();
~vtkCompositeDataIterator() override; ~vtkCompositeDataIterator() override;
int SkipEmptyNodes; vtkTypeBool SkipEmptyNodes;
int Reverse; int Reverse;
vtkCompositeDataSet* DataSet; vtkCompositeDataSet* DataSet;
......
...@@ -95,9 +95,9 @@ public: ...@@ -95,9 +95,9 @@ public:
* VisitOnlyLeaves is false, GetCurrentDataObject() may return * VisitOnlyLeaves is false, GetCurrentDataObject() may return
* vtkCompositeDataSet. By default, VisitOnlyLeaves is 1. * vtkCompositeDataSet. By default, VisitOnlyLeaves is 1.
*/ */
vtkSetMacro(VisitOnlyLeaves, int); vtkSetMacro(VisitOnlyLeaves, vtkTypeBool);
vtkGetMacro(VisitOnlyLeaves, int); vtkGetMacro(VisitOnlyLeaves, vtkTypeBool);
vtkBooleanMacro(VisitOnlyLeaves, int); vtkBooleanMacro(VisitOnlyLeaves, vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -106,9 +106,9 @@ public: ...@@ -106,9 +106,9 @@ public:
* structure, otherwise it only visits the first level children. Set to 1 by * structure, otherwise it only visits the first level children. Set to 1 by
* default. * default.
*/ */
vtkSetMacro(TraverseSubTree, int); vtkSetMacro(TraverseSubTree, vtkTypeBool);
vtkGetMacro(TraverseSubTree, int); vtkGetMacro(TraverseSubTree, vtkTypeBool);
vtkBooleanMacro(TraverseSubTree, int); vtkBooleanMacro(TraverseSubTree, vtkTypeBool);
//@} //@}
protected: protected:
...@@ -142,8 +142,8 @@ private: ...@@ -142,8 +142,8 @@ private:
vtkInternals* Internals; vtkInternals* Internals;
friend class vtkInternals; friend class vtkInternals;
int TraverseSubTree; vtkTypeBool TraverseSubTree;
int VisitOnlyLeaves; vtkTypeBool VisitOnlyLeaves;
/** /**
* Helper method used by vtkInternals to get access to the internals of * Helper method used by vtkInternals to get access to the internals of
......
...@@ -100,9 +100,9 @@ public: ...@@ -100,9 +100,9 @@ public:
/** /**
* Turn caching on/off. * Turn caching on/off.
*/ */
vtkGetMacro(Caching, int); vtkGetMacro(Caching, vtkTypeBool);
vtkSetMacro(Caching, int); vtkSetMacro(Caching, vtkTypeBool);
vtkBooleanMacro(Caching, int); vtkBooleanMacro(Caching, vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -150,7 +150,7 @@ protected: ...@@ -150,7 +150,7 @@ protected:
double LastPCoords[3]; // last local coordinates double LastPCoords[3]; // last local coordinates
int CacheHit; int CacheHit;
int CacheMiss; int CacheMiss;
int Caching; vtkTypeBool Caching;
vtkGenericDataSet* LastDataSet; vtkGenericDataSet* LastDataSet;
......
...@@ -83,9 +83,9 @@ public: ...@@ -83,9 +83,9 @@ public:
* Set/Get ClampValue. If On, results of the interpolation will be * Set/Get ClampValue. If On, results of the interpolation will be
* clamped to the min/max of the input data. * clamped to the min/max of the input data.
*/ */
vtkSetMacro(ClampValue,int); vtkSetMacro(ClampValue,vtkTypeBool);
vtkGetMacro(ClampValue,int); vtkGetMacro(ClampValue,vtkTypeBool);
vtkBooleanMacro(ClampValue,int); vtkBooleanMacro(ClampValue,vtkTypeBool);
//@} //@}
/** /**
...@@ -124,9 +124,9 @@ public: ...@@ -124,9 +124,9 @@ public:
* a continuous loop: the first and last points are the same, and * a continuous loop: the first and last points are the same, and
* derivatives are continuous. * derivatives are continuous.
*/ */
vtkSetMacro(Closed,int); vtkSetMacro(Closed,vtkTypeBool);
vtkGetMacro(Closed,int); vtkGetMacro(Closed,vtkTypeBool);
vtkBooleanMacro(Closed,int); vtkBooleanMacro(Closed,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -178,7 +178,7 @@ protected: ...@@ -178,7 +178,7 @@ protected:
~vtkSpline() override; ~vtkSpline() override;
vtkMTimeType ComputeTime; vtkMTimeType ComputeTime;
int ClampValue; vtkTypeBool ClampValue;
double *Intervals; double *Intervals;
double *Coefficients; double *Coefficients;
int LeftConstraint; int LeftConstraint;
...@@ -186,7 +186,7 @@ protected: ...@@ -186,7 +186,7 @@ protected:
int RightConstraint; int RightConstraint;
double RightValue; double RightValue;
vtkPiecewiseFunction *PiecewiseFunction; vtkPiecewiseFunction *PiecewiseFunction;
int Closed; vtkTypeBool Closed;
// Explicitly specify the parametric range. // Explicitly specify the parametric range.
double ParametricRange[2]; double ParametricRange[2];
......
...@@ -119,16 +119,16 @@ public: ...@@ -119,16 +119,16 @@ public:
/** /**
* Set/Get whether or not the superquadric is toroidal (1) or ellipsoidal (0). * Set/Get whether or not the superquadric is toroidal (1) or ellipsoidal (0).
*/ */
vtkBooleanMacro(Toroidal,int); vtkBooleanMacro(Toroidal,vtkTypeBool);
vtkGetMacro(Toroidal,int); vtkGetMacro(Toroidal,vtkTypeBool);
vtkSetMacro(Toroidal,int); vtkSetMacro(Toroidal,vtkTypeBool);
//@} //@}
protected: protected:
vtkSuperquadric(); vtkSuperquadric();
~vtkSuperquadric() override {} ~vtkSuperquadric() override {}
int Toroidal; vtkTypeBool Toroidal;
double Thickness; double Thickness;
double Size; double Size;
double PhiRoundness; double PhiRoundness;
......
...@@ -200,9 +200,9 @@ public: ...@@ -200,9 +200,9 @@ public:
* Set/Get the AbortExecute flag for the process object. Process objects * Set/Get the AbortExecute flag for the process object. Process objects
* may handle premature termination of execution in different ways. * may handle premature termination of execution in different ways.
*/ */
vtkSetMacro(AbortExecute,int); vtkSetMacro(AbortExecute,vtkTypeBool);
vtkGetMacro(AbortExecute,int); vtkGetMacro(AbortExecute,vtkTypeBool);
vtkBooleanMacro(AbortExecute,int); vtkBooleanMacro(AbortExecute,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -241,7 +241,7 @@ public: ...@@ -241,7 +241,7 @@ public:
//@} //@}
// left public for performance since it is used in inner loops // left public for performance since it is used in inner loops
int AbortExecute; vtkTypeBool AbortExecute;
/** /**
* Keys used to specify input port requirements. * Keys used to specify input port requirements.
......
...@@ -74,9 +74,9 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentRCBPartitioner : public vtkObject ...@@ -74,9 +74,9 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentRCBPartitioner : public vtkObject
/** /**
* On/Off DuplicateNodes between partitions. Default is On. * On/Off DuplicateNodes between partitions. Default is On.
*/ */
vtkSetMacro(DuplicateNodes,int); vtkSetMacro(DuplicateNodes,vtkTypeBool);
vtkGetMacro(DuplicateNodes,int); vtkGetMacro(DuplicateNodes,vtkTypeBool);
vtkBooleanMacro(DuplicateNodes,int); vtkBooleanMacro(DuplicateNodes,vtkTypeBool);
//@} //@}
//@{ //@{
...@@ -209,7 +209,7 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentRCBPartitioner : public vtkObject ...@@ -209,7 +209,7 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentRCBPartitioner : public vtkObject
int NumberOfPartitions; int NumberOfPartitions;
int NumExtents; int NumExtents;
int DuplicateNodes; // indicates whether nodes are duplicated between vtkTypeBool DuplicateNodes; // indicates whether nodes are duplicated between
// partitions, so that they are abutting. This is // partitions, so that they are abutting. This is
// set to true by default. If disabled, the resulting // set to true by default. If disabled, the resulting
// partitions will have gaps. // partitions will have gaps.
......
...@@ -104,9 +104,9 @@ public: ...@@ -104,9 +104,9 @@ public:
* point data are stored in a planar slice per piece with no cell * point data are stored in a planar slice per piece with no cell
* data. The default is OFF. * data. The default is OFF.
*/ */
vtkGetMacro(PointMode, int); vtkGetMacro(PointMode, vtkTypeBool);
vtkSetMacro(PointMode, int); vtkSetMacro(PointMode, vtkTypeBool);
vtkBooleanMacro(PointMode, int); vtkBooleanMacro(PointMode, vtkTypeBool);
//@} //@}
protected: protected:
...@@ -125,7 +125,7 @@ protected: ...@@ -125,7 +125,7 @@ protected:
// On if reading only all points (but not always all cells) is // On if reading only all points (but not always all cells) is
// necessary. Used for reading volumes of planar slices storing // necessary. Used for reading volumes of planar slices storing
// only point data. // only point data.
int PointMode; vtkTypeBool PointMode;
private: private:
vtkExtentSplitter(const vtkExtentSplitter&) = delete; vtkExtentSplitter(const vtkExtentSplitter&) = delete;
......
...@@ -60,9 +60,9 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUniformGridPartitioner : ...@@ -60,9 +60,9 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUniformGridPartitioner :
//@} //@}
//@{ //@{
vtkGetMacro(DuplicateNodes,int); vtkGetMacro(DuplicateNodes,vtkTypeBool);
vtkSetMacro(DuplicateNodes,int); vtkSetMacro(DuplicateNodes,vtkTypeBool);
vtkBooleanMacro(DuplicateNodes,int); vtkBooleanMacro(DuplicateNodes,vtkTypeBool);
//@} //@}
protected: protected:
...@@ -77,7 +77,7 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUniformGridPartitioner : ...@@ -77,7 +77,7 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUniformGridPartitioner :
int NumberOfPartitions; int NumberOfPartitions;
int NumberOfGhostLayers; int NumberOfGhostLayers;
int DuplicateNodes; vtkTypeBool DuplicateNodes;
private: private:
vtkUniformGridPartitioner(const vtkUniformGridPartitioner &) = delete; vtkUniformGridPartitioner(const vtkUniformGridPartitioner &) = delete;
void operator=(const vtkUniformGridPartitioner &) = delete; void operator=(const vtkUniformGridPartitioner &) = delete;
......
...@@ -53,18 +53,18 @@ public: ...@@ -53,18 +53,18 @@ public:
/** /**
* Set/Get ForwardUpstream property * Set/Get ForwardUpstream property
*/ */
vtkSetMacro( ForwardUpstream, int ); vtkSetMacro( ForwardUpstream, vtkTypeBool );
vtkGetMacro( ForwardUpstream, int ); vtkGetMacro( ForwardUpstream, vtkTypeBool );
vtkBooleanMacro( ForwardUpstream, int ); vtkBooleanMacro( ForwardUpstream, vtkTypeBool );
//@} //@}
//@{ //@{
/** /**
* Set/Get EnablePrefetching property * Set/Get EnablePrefetching property
*/ */
vtkSetMacro( EnablePrefetching, int ); vtkSetMacro( EnablePrefetching, vtkTypeBool );
vtkGetMacro( EnablePrefetching, int ); vtkGetMacro( EnablePrefetching, vtkTypeBool );
vtkBooleanMacro( EnablePrefetching, int ); vtkBooleanMacro( EnablePrefetching, vtkTypeBool );
//@} //@}
//@{ //@{
...@@ -184,8 +184,8 @@ protected: ...@@ -184,8 +184,8 @@ protected:
int MaxResolution; int MaxResolution;
vtkMultiProcessController *Controller; vtkMultiProcessController *Controller;
int ForwardUpstream; vtkTypeBool ForwardUpstream;
int EnablePrefetching; vtkTypeBool EnablePrefetching;
std::vector< int > BlocksToLoad; std::vector< int > BlocksToLoad;
......