Commit 07a5fc02 authored by Jim Miller's avatar Jim Miller
Browse files

FIX: Removed warnings. Most of the warnings were due to a subclass not

     overriding ALL versions of an overloaded function.  These were addressed
     by filling in the rest of the API.  In some cases, a subclass was
     overriding and overloading a function (changing input parameter to a
     more specific type).  For these cases, we "hid" the original function
     in the private section of the subclass.  There was one internal API
     change.  SetInput/Output(i, vtkDataObject*) was changed to SetNthInput/Output(.)
parent de59556a
......@@ -100,6 +100,13 @@ protected:
void operator=(const vtkActor2DCollection&) {};
virtual void DeleteElement(vtkCollectionElement *);
private:
// hide the standard AddItem from the user and the compiler.
void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
int IsItemPresent(vtkObject *o) { return this->vtkCollection::IsItemPresent(o); };
};
inline int vtkActor2DCollection::IsItemPresent(vtkActor2D *a)
......
......@@ -168,6 +168,11 @@ protected:
float *Tuple;
int SaveUserArray;
private:
// hide superclass' DeepCopy() from the user and the compiler
void DeepCopy(vtkDataArray &da) {this->vtkDataArray::DeepCopy(&da);}
};
inline unsigned char *vtkBitArray::WritePointer(const int id, const int number)
......
......@@ -125,7 +125,7 @@ void vtkDataObject::Initialize()
// no modification when initialized.
//
this->FieldData->Initialize();
};
}
//----------------------------------------------------------------------------
void vtkDataObject::SetGlobalReleaseDataFlag(int val)
......@@ -348,13 +348,13 @@ unsigned long vtkDataObject::GetEstimatedWholeMemorySize()
}
//----------------------------------------------------------------------------
void vtkDataObject::SetPipelineMTime(long t)
void vtkDataObject::SetPipelineMTime(unsigned long t)
{
this->Information->SetPipelineMTime(t);
}
//----------------------------------------------------------------------------
long vtkDataObject::GetPipelineMTime()
unsigned long vtkDataObject::GetPipelineMTime()
{
return this->Information->GetPipelineMTime();
}
......
......@@ -206,8 +206,8 @@ public:
// It does not include mtimes of the data objects.
// UpdateInformation must be called for the PipelineMTime to be correct.
// Only the source should set the PipelineMTime.
void SetPipelineMTime(long t);
long GetPipelineMTime();
void SetPipelineMTime(unsigned long t);
unsigned long GetPipelineMTime();
// Description:
// Copies the UpdateExtent from another dataset of the same type.
......
......@@ -76,6 +76,11 @@ protected:
vtkDataSetCollection(const vtkDataSetCollection&) {};
void operator=(const vtkDataSetCollection&) {};
private:
// hide the standard AddItem from the user and the compiler.
void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
};
......
......@@ -78,9 +78,11 @@ vtkEdgeTable::vtkEdgeTable()
// Free memory and return to instantiated state.
void vtkEdgeTable::Initialize()
{
int i;
if ( this->Table )
{
for (int i=0; i < this->TableSize; i++)
for (i=0; i < this->TableSize; i++)
{
if ( this->Table[i] )
{
......@@ -94,7 +96,7 @@ void vtkEdgeTable::Initialize()
if ( this->StoreAttributes )
{
for (int i=0; i < this->TableSize; i++)
for (i=0; i < this->TableSize; i++)
{
if ( this->Attributes[i] )
{
......@@ -161,6 +163,8 @@ vtkEdgeTable::~vtkEdgeTable()
int vtkEdgeTable::InitEdgeInsertion(int numPoints, int storeAttributes)
{
int i;
if ( numPoints < 1 )
{
numPoints = 1;
......@@ -171,7 +175,7 @@ int vtkEdgeTable::InitEdgeInsertion(int numPoints, int storeAttributes)
{
this->Initialize();
this->Table = new vtkIdList *[numPoints];
for (int i=0; i < numPoints; i++)
for (i=0; i < numPoints; i++)
{
this->Table[i] = NULL;
}
......@@ -180,7 +184,7 @@ int vtkEdgeTable::InitEdgeInsertion(int numPoints, int storeAttributes)
if ( this->StoreAttributes )
{
this->Attributes = new vtkIdList *[numPoints];
for (int i=0; i < numPoints; i++)
for (i=0; i < numPoints; i++)
{
this->Attributes[i] = NULL;
}
......
......@@ -79,6 +79,9 @@ protected:
vtkFloatNormals(const vtkFloatNormals&) {};
void operator=(const vtkFloatNormals&) {};
private:
// hide the vtkNormal's New() method
static vtkFloatNormals *New(int) { return vtkFloatNormals::New();};
};
inline float *vtkFloatNormals::GetPointer(const int id)
......
......@@ -78,7 +78,12 @@ protected:
~vtkFloatScalars() {};
vtkFloatScalars(const vtkFloatScalars&) {};
void operator=(const vtkFloatScalars&) {};
private:
// hide the vtkScalars' New() method
static vtkFloatScalars *New(int) { return vtkFloatScalars::New();};
static vtkFloatScalars *New(int dataType, int numComp)
{ return (vtkFloatScalars *)vtkScalars::New(dataType, numComp);};
};
inline float *vtkFloatScalars::GetPointer(const int id)
......
......@@ -79,6 +79,11 @@ protected:
vtkFloatTCoords(const vtkFloatTCoords&) {};
void operator=(const vtkFloatTCoords&) {};
private:
// hide the vtkTCoords' New() method
static vtkFloatTCoords *New(int) { return vtkFloatTCoords::New();};
static vtkFloatTCoords *New(int dataType, int numComp)
{ return (vtkFloatTCoords *) vtkTCoords::New(dataType, numComp);};
};
inline float *vtkFloatTCoords::GetPointer(const int id)
......
......@@ -79,6 +79,9 @@ protected:
vtkFloatTensors(const vtkFloatTensors&) {};
void operator=(const vtkFloatTensors&) {};
private:
// hide the vtkTensors' New() method
static vtkFloatTensors *New(int) { return vtkFloatTensors::New();};
};
......
......@@ -79,6 +79,9 @@ protected:
vtkFloatVectors(const vtkFloatVectors&) {};
void operator=(const vtkFloatVectors&) {};
private:
// hide the vtkVectors' New() method
static vtkFloatVectors *New(int) { return vtkFloatVectors::New();};
};
inline float *vtkFloatVectors::GetPointer(const int id)
......
......@@ -950,7 +950,6 @@ int vtkImageData::ComputeStructuredCoordinates(float x[3], int ijk[3],
void vtkImageData::PrintSelf(ostream& os, vtkIndent indent)
{
int idx;
vtkIndent i2 = indent.GetNextIndent();
vtkDataSet::PrintSelf(os,indent);
......
......@@ -95,6 +95,7 @@ public:
vtkCell *GetCell(int cellId);
void GetCell(int cellId, vtkGenericCell *cell);
void GetCellBounds(int cellId, float bounds[6]);
int FindPoint(float x, float y, float z) { return this->vtkDataSet::FindPoint(x, y, z);};
int FindPoint(float x[3]);
int FindCell(float x[3], vtkCell *cell, int cellId, float tol2, int& subId,
float pcoords[3], float *weights);
......@@ -322,7 +323,7 @@ public:
// Description:
// Legacy. Replaced with GetEstimatedUpdateMemorySize.
long GetUpdateExtentMemorySize()
unsigned long GetUpdateExtentMemorySize()
{
vtkWarningMacro("Change GetUpdateExtentMemorySize to GetEstimatedUpdateMemorySize");
return this->GetEstimatedUpdateMemorySize();
......
......@@ -62,7 +62,7 @@ vtkImageSource* vtkImageSource::New()
//----------------------------------------------------------------------------
vtkImageSource::vtkImageSource()
{
this->vtkSource::SetOutput(0,vtkImageData::New());
this->vtkSource::SetNthOutput(0,vtkImageData::New());
// Releasing data for pipeline parallism.
// Filters will know it is empty.
this->Outputs[0]->ReleaseData();
......@@ -73,7 +73,7 @@ vtkImageSource::vtkImageSource()
// Specify the input data or filter.
void vtkImageSource::SetOutput(vtkImageData *output)
{
this->vtkSource::SetOutput(0, output);
this->vtkSource::SetNthOutput(0, output);
}
//----------------------------------------------------------------------------
......
......@@ -64,6 +64,8 @@ public:
// Get the output of this source.
void SetOutput(vtkImageData *output);
vtkImageData *GetOutput();
vtkImageData *GetOutput(int idx)
{return (vtkImageData *) this->vtkSource::GetOutput(idx); };
// Description:
// Legacy. Sets the UpdateExtent to the WholeExtent, and Updates.
......
......@@ -67,7 +67,7 @@ vtkImageToStructuredPoints* vtkImageToStructuredPoints::New()
vtkImageToStructuredPoints::vtkImageToStructuredPoints()
{
this->Translate[0] = this->Translate[1] = this->Translate[2] = 0;
this->SetOutput(0,vtkStructuredPoints::New());
this->SetNthOutput(0,vtkStructuredPoints::New());
this->Outputs[0]->Delete();
}
......@@ -98,7 +98,7 @@ vtkStructuredPoints *vtkImageToStructuredPoints::GetOutput()
//----------------------------------------------------------------------------
void vtkImageToStructuredPoints::SetInput(vtkImageData *input)
{
this->vtkProcessObject::SetInput(0, input);
this->vtkProcessObject::SetNthInput(0, input);
}
//----------------------------------------------------------------------------
......@@ -116,7 +116,7 @@ vtkImageData *vtkImageToStructuredPoints::GetInput()
//----------------------------------------------------------------------------
void vtkImageToStructuredPoints::SetVectorInput(vtkImageData *input)
{
this->vtkProcessObject::SetInput(1, input);
this->vtkProcessObject::SetNthInput(1, input);
}
//----------------------------------------------------------------------------
......
......@@ -68,6 +68,7 @@ public:
void SetInput(vtkImageData *input);
vtkImageData *GetInput();
// Description:
// Set/Get the input object from the image pipeline.
void SetVectorInput(vtkImageData *input);
......@@ -76,6 +77,8 @@ public:
// Description:
// Get the output of this source.
vtkStructuredPoints *GetOutput();
vtkStructuredPoints *GetOutput(int idx)
{return (vtkStructuredPoints *) this->vtkSource::GetOutput(idx); };
protected:
vtkImageToStructuredPoints();
......@@ -89,6 +92,8 @@ protected:
void Execute();
void ExecuteInformation();
int ComputeInputUpdateExtents(vtkDataObject *data);
};
......
......@@ -71,6 +71,11 @@ protected:
vtkImplicitFunctionCollection(const vtkImplicitFunctionCollection&) {};
void operator=(const vtkImplicitFunctionCollection&) {};
private:
// hide the standard AddItem from the user and the compiler.
void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
};
inline void vtkImplicitFunctionCollection::AddItem(vtkImplicitFunction *f)
......
......@@ -68,7 +68,7 @@ vtkLookupTable(sze,ext)
this->LogMinRange = 0.0;
this->LogMaxRange = 1.0;
this->UseAbsoluteValue = 0;
};
}
// Set the minimum/maximum scalar values for scalar mapping. Scalar values
// less than minimum range value are clamped to minimum range value.
......@@ -162,7 +162,7 @@ static void vtkLogLookupTableMapDataToRGBA(vtkLogLookupTable *self,
}
}
void vtkLogLookupTable::MapScalarsThroughTable(void *input,
void vtkLogLookupTable::MapScalarsThroughTable2(void *input,
unsigned char *output,
int inputDataType,
int numberOfValues,
......
......@@ -72,6 +72,7 @@ public:
// range value. (The log base 10 of these values is taken and mapping is
// performed in logarithmic space.)
void SetTableRange(float min, float max);
void SetTableRange(float r[2]) { this->SetTableRange(r[0], r[1]);};
// Description:
// Given a scalar value v, return an rgba color value from lookup table.
......@@ -81,7 +82,7 @@ public:
// Description:
// map a set of scalars through the lookup table
void MapScalarsThroughTable(void *input, unsigned char *output,
void MapScalarsThroughTable2(void *input, unsigned char *output,
int inputDataType, int numberOfValues,
int inputIncrement);
protected:
......
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