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:
* Turns on buffer flushing for the output
* to the log file.
*/
vtkSetMacro(Flush, int);
vtkGetMacro(Flush, int);
vtkBooleanMacro(Flush, int);
vtkSetMacro(Flush, vtkTypeBool);
vtkGetMacro(Flush, vtkTypeBool);
vtkBooleanMacro(Flush, vtkTypeBool);
//@}
//@{
......@@ -68,9 +68,9 @@ public:
* it will be overwritten each time the vtkFileOutputWindow
* is created.
*/
vtkSetMacro(Append, int);
vtkGetMacro(Append, int);
vtkBooleanMacro(Append, int);
vtkSetMacro(Append, vtkTypeBool);
vtkGetMacro(Append, vtkTypeBool);
vtkBooleanMacro(Append, vtkTypeBool);
//@}
protected:
......@@ -80,8 +80,8 @@ protected:
char* FileName;
ofstream* OStream;
int Flush;
int Append;
vtkTypeBool Flush;
vtkTypeBool Append;
private:
vtkFileOutputWindow(const vtkFileOutputWindow&) = delete;
......
......@@ -360,9 +360,9 @@ public:
* When categorical data is present, only values in the lookup table will be
* considered valid; all other values will be assigned \a NanColor.
*/
vtkSetMacro(IndexedLookup,int);
vtkGetMacro(IndexedLookup,int);
vtkBooleanMacro(IndexedLookup,int);
vtkSetMacro(IndexedLookup,vtkTypeBool);
vtkGetMacro(IndexedLookup,vtkTypeBool);
vtkBooleanMacro(IndexedLookup,vtkTypeBool);
//@}
......@@ -442,7 +442,7 @@ protected:
class vtkInternalAnnotatedValueMap;
vtkInternalAnnotatedValueMap* AnnotatedValueMap;
int IndexedLookup;
vtkTypeBool IndexedLookup;
double Alpha;
......
......@@ -88,9 +88,9 @@ public:
/**
* Keep track of whether the rendering window has been mapped to screen.
*/
vtkSetMacro(Mapped,int);
vtkGetMacro(Mapped,int);
vtkBooleanMacro(Mapped,int);
vtkSetMacro(Mapped,vtkTypeBool);
vtkGetMacro(Mapped,vtkTypeBool);
vtkBooleanMacro(Mapped,vtkTypeBool);
//@}
//@{
......@@ -100,18 +100,18 @@ public:
* buffering off or make use of the SwapBuffers methods to prevent
* you from swapping buffers between exposures.
*/
vtkSetMacro(Erase,int);
vtkGetMacro(Erase,int);
vtkBooleanMacro(Erase,int);
vtkSetMacro(Erase,vtkTypeBool);
vtkGetMacro(Erase,vtkTypeBool);
vtkBooleanMacro(Erase,vtkTypeBool);
//@}
//@{
/**
* Keep track of whether double buffering is on or off
*/
vtkSetMacro(DoubleBuffer,int);
vtkGetMacro(DoubleBuffer,int);
vtkBooleanMacro(DoubleBuffer,int);
vtkSetMacro(DoubleBuffer,vtkTypeBool);
vtkGetMacro(DoubleBuffer,vtkTypeBool);
vtkBooleanMacro(DoubleBuffer,vtkTypeBool);
//@}
//@{
......@@ -170,9 +170,9 @@ public:
* supported for every type of window and on some windows you may need to
* invoke this prior to the first render.
*/
vtkSetMacro(OffScreenRendering,int);
vtkGetMacro(OffScreenRendering,int);
vtkBooleanMacro(OffScreenRendering,int);
vtkSetMacro(OffScreenRendering,vtkTypeBool);
vtkGetMacro(OffScreenRendering,vtkTypeBool);
vtkBooleanMacro(OffScreenRendering,vtkTypeBool);
//@}
/**
......@@ -196,16 +196,16 @@ public:
//@}
protected:
int OffScreenRendering;
vtkTypeBool OffScreenRendering;
vtkWindow();
~vtkWindow() override;
char *WindowName;
int Size[2];
int Position[2];
int Mapped;
int Erase;
int DoubleBuffer;
vtkTypeBool Mapped;
vtkTypeBool Erase;
vtkTypeBool DoubleBuffer;
int DPI;
double TileViewport[4];
......
......@@ -70,9 +70,9 @@ public:
* won't cause disk caching (24 extra bytes per cell are required to
* save the bounds).
*/
vtkSetMacro(CacheCellBounds,int);
vtkGetMacro(CacheCellBounds,int);
vtkBooleanMacro(CacheCellBounds,int);
vtkSetMacro(CacheCellBounds,vtkTypeBool);
vtkGetMacro(CacheCellBounds,vtkTypeBool);
vtkBooleanMacro(CacheCellBounds,vtkTypeBool);
//@}
//@{
......@@ -81,9 +81,9 @@ public:
* not applicable to all implementations, but if the locator is being used
* as a geometry simplification technique, there is no need to keep them.
*/
vtkSetMacro(RetainCellLists,int);
vtkGetMacro(RetainCellLists,int);
vtkBooleanMacro(RetainCellLists,int);
vtkSetMacro(RetainCellLists,vtkTypeBool);
vtkGetMacro(RetainCellLists,vtkTypeBool);
vtkBooleanMacro(RetainCellLists,vtkTypeBool);
//@}
//@{
......@@ -93,9 +93,9 @@ public:
* If LazyEvaluation is supported, this turns on/off the feature.
* if not supported, it is ignored.
*/
vtkSetMacro(LazyEvaluation,int);
vtkGetMacro(LazyEvaluation,int);
vtkBooleanMacro(LazyEvaluation,int);
vtkSetMacro(LazyEvaluation,vtkTypeBool);
vtkGetMacro(LazyEvaluation,vtkTypeBool);
vtkBooleanMacro(LazyEvaluation,vtkTypeBool);
//@}
//@{
......@@ -106,9 +106,9 @@ public:
* Turning on this flag enables some locators to skip the rebuilding
* phase
*/
vtkSetMacro(UseExistingSearchStructure,int);
vtkGetMacro(UseExistingSearchStructure,int);
vtkBooleanMacro(UseExistingSearchStructure,int);
vtkSetMacro(UseExistingSearchStructure,vtkTypeBool);
vtkGetMacro(UseExistingSearchStructure,vtkTypeBool);
vtkBooleanMacro(UseExistingSearchStructure,vtkTypeBool);
//@}
/**
......@@ -287,10 +287,10 @@ protected:
//@}
int NumberOfCellsPerNode;
int RetainCellLists;
int CacheCellBounds;
int LazyEvaluation;
int UseExistingSearchStructure;
vtkTypeBool RetainCellLists;
vtkTypeBool CacheCellBounds;
vtkTypeBool LazyEvaluation;
vtkTypeBool UseExistingSearchStructure;
vtkGenericCell *GenericCell;
double (*CellBounds)[6];
......
......@@ -98,9 +98,9 @@ public:
* If SkipEmptyNodes is true, then nullptr datasets will be skipped. Default is
* true.
*/
vtkSetMacro(SkipEmptyNodes, int);
vtkGetMacro(SkipEmptyNodes, int);
vtkBooleanMacro(SkipEmptyNodes, int);
vtkSetMacro(SkipEmptyNodes, vtkTypeBool);
vtkGetMacro(SkipEmptyNodes, vtkTypeBool);
vtkBooleanMacro(SkipEmptyNodes, vtkTypeBool);
//@}
/**
......@@ -118,7 +118,7 @@ public:
protected:
vtkCompositeDataIterator();
~vtkCompositeDataIterator() override;
int SkipEmptyNodes;
vtkTypeBool SkipEmptyNodes;
int Reverse;
vtkCompositeDataSet* DataSet;
......
......@@ -95,9 +95,9 @@ public:
* VisitOnlyLeaves is false, GetCurrentDataObject() may return
* vtkCompositeDataSet. By default, VisitOnlyLeaves is 1.
*/
vtkSetMacro(VisitOnlyLeaves, int);
vtkGetMacro(VisitOnlyLeaves, int);
vtkBooleanMacro(VisitOnlyLeaves, int);
vtkSetMacro(VisitOnlyLeaves, vtkTypeBool);
vtkGetMacro(VisitOnlyLeaves, vtkTypeBool);
vtkBooleanMacro(VisitOnlyLeaves, vtkTypeBool);
//@}
//@{
......@@ -106,9 +106,9 @@ public:
* structure, otherwise it only visits the first level children. Set to 1 by
* default.
*/
vtkSetMacro(TraverseSubTree, int);
vtkGetMacro(TraverseSubTree, int);
vtkBooleanMacro(TraverseSubTree, int);
vtkSetMacro(TraverseSubTree, vtkTypeBool);
vtkGetMacro(TraverseSubTree, vtkTypeBool);
vtkBooleanMacro(TraverseSubTree, vtkTypeBool);
//@}
protected:
......@@ -142,8 +142,8 @@ private:
vtkInternals* Internals;
friend class vtkInternals;
int TraverseSubTree;
int VisitOnlyLeaves;
vtkTypeBool TraverseSubTree;
vtkTypeBool VisitOnlyLeaves;
/**
* Helper method used by vtkInternals to get access to the internals of
......
......@@ -100,9 +100,9 @@ public:
/**
* Turn caching on/off.
*/
vtkGetMacro(Caching, int);
vtkSetMacro(Caching, int);
vtkBooleanMacro(Caching, int);
vtkGetMacro(Caching, vtkTypeBool);
vtkSetMacro(Caching, vtkTypeBool);
vtkBooleanMacro(Caching, vtkTypeBool);
//@}
//@{
......@@ -150,7 +150,7 @@ protected:
double LastPCoords[3]; // last local coordinates
int CacheHit;
int CacheMiss;
int Caching;
vtkTypeBool Caching;
vtkGenericDataSet* LastDataSet;
......
......@@ -83,9 +83,9 @@ public:
* Set/Get ClampValue. If On, results of the interpolation will be
* clamped to the min/max of the input data.
*/
vtkSetMacro(ClampValue,int);
vtkGetMacro(ClampValue,int);
vtkBooleanMacro(ClampValue,int);
vtkSetMacro(ClampValue,vtkTypeBool);
vtkGetMacro(ClampValue,vtkTypeBool);
vtkBooleanMacro(ClampValue,vtkTypeBool);
//@}
/**
......@@ -124,9 +124,9 @@ public:
* a continuous loop: the first and last points are the same, and
* derivatives are continuous.
*/
vtkSetMacro(Closed,int);
vtkGetMacro(Closed,int);
vtkBooleanMacro(Closed,int);
vtkSetMacro(Closed,vtkTypeBool);
vtkGetMacro(Closed,vtkTypeBool);
vtkBooleanMacro(Closed,vtkTypeBool);
//@}
//@{
......@@ -178,7 +178,7 @@ protected:
~vtkSpline() override;
vtkMTimeType ComputeTime;
int ClampValue;
vtkTypeBool ClampValue;
double *Intervals;
double *Coefficients;
int LeftConstraint;
......@@ -186,7 +186,7 @@ protected:
int RightConstraint;
double RightValue;
vtkPiecewiseFunction *PiecewiseFunction;
int Closed;
vtkTypeBool Closed;
// Explicitly specify the parametric range.
double ParametricRange[2];
......
......@@ -119,16 +119,16 @@ public:
/**
* Set/Get whether or not the superquadric is toroidal (1) or ellipsoidal (0).
*/
vtkBooleanMacro(Toroidal,int);
vtkGetMacro(Toroidal,int);
vtkSetMacro(Toroidal,int);
vtkBooleanMacro(Toroidal,vtkTypeBool);
vtkGetMacro(Toroidal,vtkTypeBool);
vtkSetMacro(Toroidal,vtkTypeBool);
//@}
protected:
vtkSuperquadric();
~vtkSuperquadric() override {}
int Toroidal;
vtkTypeBool Toroidal;
double Thickness;
double Size;
double PhiRoundness;
......
......@@ -200,9 +200,9 @@ public:
* Set/Get the AbortExecute flag for the process object. Process objects
* may handle premature termination of execution in different ways.
*/
vtkSetMacro(AbortExecute,int);
vtkGetMacro(AbortExecute,int);
vtkBooleanMacro(AbortExecute,int);
vtkSetMacro(AbortExecute,vtkTypeBool);
vtkGetMacro(AbortExecute,vtkTypeBool);
vtkBooleanMacro(AbortExecute,vtkTypeBool);
//@}
//@{
......@@ -241,7 +241,7 @@ public:
//@}
// left public for performance since it is used in inner loops
int AbortExecute;
vtkTypeBool AbortExecute;
/**
* Keys used to specify input port requirements.
......
......@@ -74,9 +74,9 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentRCBPartitioner : public vtkObject
/**
* On/Off DuplicateNodes between partitions. Default is On.
*/
vtkSetMacro(DuplicateNodes,int);
vtkGetMacro(DuplicateNodes,int);
vtkBooleanMacro(DuplicateNodes,int);
vtkSetMacro(DuplicateNodes,vtkTypeBool);
vtkGetMacro(DuplicateNodes,vtkTypeBool);
vtkBooleanMacro(DuplicateNodes,vtkTypeBool);
//@}
//@{
......@@ -209,7 +209,7 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentRCBPartitioner : public vtkObject
int NumberOfPartitions;
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
// set to true by default. If disabled, the resulting
// partitions will have gaps.
......
......@@ -104,9 +104,9 @@ public:
* point data are stored in a planar slice per piece with no cell
* data. The default is OFF.
*/
vtkGetMacro(PointMode, int);
vtkSetMacro(PointMode, int);
vtkBooleanMacro(PointMode, int);
vtkGetMacro(PointMode, vtkTypeBool);
vtkSetMacro(PointMode, vtkTypeBool);
vtkBooleanMacro(PointMode, vtkTypeBool);
//@}
protected:
......@@ -125,7 +125,7 @@ protected:
// On if reading only all points (but not always all cells) is
// necessary. Used for reading volumes of planar slices storing
// only point data.
int PointMode;
vtkTypeBool PointMode;
private:
vtkExtentSplitter(const vtkExtentSplitter&) = delete;
......
......@@ -60,9 +60,9 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUniformGridPartitioner :
//@}
//@{
vtkGetMacro(DuplicateNodes,int);
vtkSetMacro(DuplicateNodes,int);
vtkBooleanMacro(DuplicateNodes,int);
vtkGetMacro(DuplicateNodes,vtkTypeBool);
vtkSetMacro(DuplicateNodes,vtkTypeBool);
vtkBooleanMacro(DuplicateNodes,vtkTypeBool);
//@}
protected:
......@@ -77,7 +77,7 @@ class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUniformGridPartitioner :
int NumberOfPartitions;
int NumberOfGhostLayers;
int DuplicateNodes;
vtkTypeBool DuplicateNodes;
private:
vtkUniformGridPartitioner(const vtkUniformGridPartitioner &) = delete;
void operator=(const vtkUniformGridPartitioner &) = delete;
......
......@@ -53,18 +53,18 @@ public:
/**
* Set/Get ForwardUpstream property
*/
vtkSetMacro( ForwardUpstream, int );
vtkGetMacro( ForwardUpstream, int );
vtkBooleanMacro( ForwardUpstream, int );
vtkSetMacro( ForwardUpstream, vtkTypeBool );
vtkGetMacro( ForwardUpstream, vtkTypeBool );
vtkBooleanMacro( ForwardUpstream, vtkTypeBool );
//@}
//@{
/**
* Set/Get EnablePrefetching property
*/
vtkSetMacro( EnablePrefetching, int );
vtkGetMacro( EnablePrefetching, int );
vtkBooleanMacro( EnablePrefetching, int );
vtkSetMacro( EnablePrefetching, vtkTypeBool );
vtkGetMacro( EnablePrefetching, vtkTypeBool );
vtkBooleanMacro( EnablePrefetching, vtkTypeBool );
//@}
//@{
......@@ -184,8 +184,8 @@ protected:
int MaxResolution;
vtkMultiProcessController *Controller;
int ForwardUpstream;
int EnablePrefetching;
vtkTypeBool ForwardUpstream;
vtkTypeBool EnablePrefetching;
std::vector< int > BlocksToLoad;
......
......@@ -74,9 +74,9 @@ public:
* If AppendFieldData is non-zero, then field data arrays from all the inputs are added
* to the output. If there are duplicates, the array on the first input encountered is taken.
*/
vtkSetMacro(AppendFieldData,int);
vtkGetMacro(AppendFieldData,int);
vtkBooleanMacro(AppendFieldData,int);
vtkSetMacro(AppendFieldData,vtkTypeBool);
vtkGetMacro(AppendFieldData,vtkTypeBool);
vtkBooleanMacro(AppendFieldData,vtkTypeBool);
//@}
protected:
......@@ -120,7 +120,7 @@ protected:
virtual void AppendFieldDataArrays(vtkInformationVector* inputVector,
int i, int numInputs, vtkCompositeDataIterator* iter, vtkDataSet* dset );
int AppendFieldData;
vtkTypeBool AppendFieldData;
private:
vtkAppendCompositeDataLeaves ( const vtkAppendCompositeDataLeaves& ) = delete;
......
......@@ -57,7 +57,7 @@ public:
* Note: The filter will only merge points if the ghost cell array doesn't exist
* Defaults to Off
*/
vtkGetMacro(MergePoints,int);
vtkGetMacro(MergePoints,vtkTypeBool);
//@}
//@{
......@@ -66,10 +66,10 @@ public:
* Note: The filter will only merge points if the ghost cell array doesn't exist
* Defaults to Off
*/
vtkSetMacro(MergePoints,int);
vtkSetMacro(MergePoints,vtkTypeBool);
//@}
vtkBooleanMacro(MergePoints,int);
vtkBooleanMacro(MergePoints,vtkTypeBool);
/**
* Remove a dataset from the list of data to append.
......@@ -108,7 +108,7 @@ protected:
//If true we will attempt to merge points. Must also not have
//ghost cells defined.
int MergePoints;
vtkTypeBool MergePoints;
int OutputPointsPrecision;
......
......@@ -54,9 +54,9 @@ public:
* SetNumberOfInputs/SetInputConnectionByNumber should not be mixed with calls
* to AddInput/RemoveInput. By default, UserManagedInputs is false.
*/
vtkSetMacro(UserManagedInputs,int);
vtkGetMacro(UserManagedInputs,int);
vtkBooleanMacro(UserManagedInputs,int);
vtkSetMacro(UserManagedInputs,vtkTypeBool);
vtkGetMacro(UserManagedInputs,vtkTypeBool);
vtkBooleanMacro(UserManagedInputs,vtkTypeBool);
//@}
/**
......@@ -100,9 +100,9 @@ public:
* data parallelism at a course scale. Each of the inputs
* can be generated in a different process at the same time.
*/
vtkSetMacro(ParallelStreaming, int);
vtkGetMacro(ParallelStreaming, int);
vtkBooleanMacro(ParallelStreaming, int);
vtkSetMacro(ParallelStreaming, vtkTypeBool);
vtkGetMacro(ParallelStreaming, vtkTypeBool);
vtkBooleanMacro(ParallelStreaming, vtkTypeBool);
//@}
//@{
......@@ -123,7 +123,7 @@ protected:
~vtkAppendPolyData() override;
// Flag for selecting parallel streaming behavior
int ParallelStreaming;
vtkTypeBool ParallelStreaming;
int OutputPointsPrecision;
// Usual data generation method
......@@ -146,7 +146,7 @@ protected:
void AddInputData(vtkDataObject *)
{ vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); };
int UserManagedInputs;
vtkTypeBool UserManagedInputs;
private:
vtkAppendPolyData(const vtkAppendPolyData&) = delete;
......
......@@ -49,9 +49,9 @@ public:
* SetNumberOfInputs/SetInputByNumber should not be mixed with calls
* to AddInput/RemoveInput. By default, UserManagedInputs is false.
*/
vtkSetMacro(UserManagedInputs,int);
vtkGetMacro(UserManagedInputs,int);
vtkBooleanMacro(UserManagedInputs,int);
vtkSetMacro(UserManagedInputs,vtkTypeBool);
vtkGetMacro(UserManagedInputs,vtkTypeBool);
vtkBooleanMacro(UserManagedInputs,vtkTypeBool);
//@}
/**
......@@ -92,9 +92,9 @@ public:
* for selections with different content types and properties. Default is
* true.
*/
vtkSetMacro(AppendByUnion, int);
vtkGetMacro(AppendByUnion, int);
vtkBooleanMacro(AppendByUnion, int);
vtkSetMacro(AppendByUnion, vtkTypeBool);
vtkGetMacro(AppendByUnion, vtkTypeBool);
vtkBooleanMacro(AppendByUnion, vtkTypeBool);
//@}
protected:
......@@ -111,8 +111,8 @@ protected:
void AddInputData(vtkDataObject *)
{ vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); };
int UserManagedInputs;
int AppendByUnion;
vtkTypeBool UserManagedInputs;
vtkTypeBool AppendByUnion;
private:
vtkAppendSelection(const vtkAppendSelection&) = delete;
void operator=(const vtkAppendSelection&) = delete;
......
......@@ -155,9 +155,9 @@ public:
* if the AttributeMode is AttributeModeToUsePointData.
* If a valid output can't be made, an error will occur.
*/
vtkGetMacro(CoordinateResults, int);
vtkSetMacro(CoordinateResults, int);
vtkBooleanMacro(CoordinateResults, int);
vtkGetMacro(CoordinateResults, vtkTypeBool);
vtkSetMacro(CoordinateResults, vtkTypeBool);
vtkBooleanMacro(CoordinateResults, vtkTypeBool);
//@}
//@{
......@@ -291,9 +291,9 @@ public:
* numbers) will be replaced by ReplacementValue. Otherwise an
* error will be reported
*/
vtkSetMacro(ReplaceInvalidValues,int);
vtkGetMacro(ReplaceInvalidValues,int);
vtkBooleanMacro(ReplaceInvalidValues,int);
vtkSetMacro(ReplaceInvalidValues,vtkTypeBool);
vtkGetMacro(ReplaceInvalidValues,vtkTypeBool);
vtkBooleanMacro(ReplaceInvalidValues,vtkTypeBool);
vtkSetMacro(ReplacementValue,double);
vtkGetMacro(ReplacementValue,double);
//@}
......@@ -325,10 +325,10 @@ protected:
int ** SelectedVectorComponents;
vtkFunctionParser* FunctionParser;
int ReplaceInvalidValues;
vtkTypeBool ReplaceInvalidValues;
double ReplacementValue;
int CoordinateResults;