Commit d148cdd2 authored by Andrew Bauer's avatar Andrew Bauer

Cleaning up warnings for shadowed member variables.

parent 8f39cb7f
......@@ -764,7 +764,7 @@ vtkPolyData* vtkParticleTracerBase::Execute(vtkInformationVector** inputVector)
this->ParticleSourceIds = vtkSmartPointer<vtkCharArray>::New();
this->InjectedPointIds = vtkSmartPointer<vtkIntArray>::New();
this->InjectedStepIds = vtkSmartPointer<vtkIntArray>::New();
this->ErrorCode = vtkSmartPointer<vtkIntArray>::New();
this->ErrorCodeArray = vtkSmartPointer<vtkIntArray>::New();
this->ParticleVorticity = vtkSmartPointer<vtkFloatArray>::New();
this->ParticleRotation = vtkSmartPointer<vtkFloatArray>::New();
this->ParticleAngularVel = vtkSmartPointer<vtkFloatArray>::New();
......@@ -781,7 +781,7 @@ vtkPolyData* vtkParticleTracerBase::Execute(vtkInformationVector** inputVector)
this->ParticleSourceIds->SetName("ParticleSourceId");
this->InjectedPointIds->SetName("InjectedPointId");
this->InjectedStepIds->SetName("InjectionStepId");
this->ErrorCode->SetName("ErrorCode");
this->ErrorCodeArray->SetName("ErrorCode");
if (this->ComputeVorticity)
{
......@@ -950,7 +950,7 @@ vtkPolyData* vtkParticleTracerBase::Execute(vtkInformationVector** inputVector)
this->OutputPointData->AddArray(this->ParticleSourceIds);
this->OutputPointData->AddArray(this->InjectedPointIds);
this->OutputPointData->AddArray(this->InjectedStepIds);
this->OutputPointData->AddArray(this->ErrorCode);
this->OutputPointData->AddArray(this->ErrorCodeArray);
this->OutputPointData->AddArray(this->ParticleAge);
if (this->ComputeVorticity)
{
......@@ -1520,7 +1520,7 @@ void vtkParticleTracerBase::AddParticle(
this->ParticleSourceIds->InsertNextValue(info.SourceID);
this->InjectedPointIds->InsertNextValue(info.InjectedPointId);
this->InjectedStepIds->InsertNextValue(info.InjectedStepId);
this->ErrorCode->InsertNextValue(info.ErrorCode);
this->ErrorCodeArray->InsertNextValue(info.ErrorCode);
this->ParticleAge->InsertNextValue(info.age);
this->AppendToExtraPointDataArrays(info);
info.PointId = tempId;
......
......@@ -558,7 +558,7 @@ public:
vtkSmartPointer<vtkCharArray> ParticleSourceIds;
vtkSmartPointer<vtkIntArray> InjectedPointIds;
vtkSmartPointer<vtkIntArray> InjectedStepIds;
vtkSmartPointer<vtkIntArray> ErrorCode;
vtkSmartPointer<vtkIntArray> ErrorCodeArray;
vtkSmartPointer<vtkFloatArray> ParticleVorticity;
vtkSmartPointer<vtkFloatArray> ParticleRotation;
vtkSmartPointer<vtkFloatArray> ParticleAngularVel;
......
......@@ -813,7 +813,7 @@ int vtkTemporalStreamTracer::GenerateOutput(vtkInformationVector** inputVector,
this->ParticleSourceIds = vtkSmartPointer<vtkCharArray>::New();
this->InjectedPointIds = vtkSmartPointer<vtkIntArray>::New();
this->InjectedStepIds = vtkSmartPointer<vtkIntArray>::New();
this->ErrorCode = vtkSmartPointer<vtkIntArray>::New();
this->ErrorCodeArray = vtkSmartPointer<vtkIntArray>::New();
this->ParticleVorticity = vtkSmartPointer<vtkFloatArray>::New();
this->ParticleRotation = vtkSmartPointer<vtkFloatArray>::New();
this->ParticleAngularVel = vtkSmartPointer<vtkFloatArray>::New();
......@@ -831,7 +831,7 @@ int vtkTemporalStreamTracer::GenerateOutput(vtkInformationVector** inputVector,
this->ParticleSourceIds->SetName("ParticleSourceId");
this->InjectedPointIds->SetName("InjectedPointId");
this->InjectedStepIds->SetName("InjectionStepId");
this->ErrorCode->SetName("ErrorCode");
this->ErrorCodeArray->SetName("ErrorCode");
if (this->ComputeVorticity)
{
......@@ -962,7 +962,7 @@ int vtkTemporalStreamTracer::GenerateOutput(vtkInformationVector** inputVector,
this->OutputPointData->AddArray(this->ParticleSourceIds);
this->OutputPointData->AddArray(this->InjectedPointIds);
this->OutputPointData->AddArray(this->InjectedStepIds);
this->OutputPointData->AddArray(this->ErrorCode);
this->OutputPointData->AddArray(this->ErrorCodeArray);
this->OutputPointData->AddArray(this->ParticleAge);
if (this->ComputeVorticity)
{
......@@ -1191,7 +1191,7 @@ void vtkTemporalStreamTracer::IntegrateParticle(
this->ParticleSourceIds->InsertNextValue(info.SourceID);
this->InjectedPointIds->InsertNextValue(info.InjectedPointId);
this->InjectedStepIds->InsertNextValue(info.InjectedStepId);
this->ErrorCode->InsertNextValue(info.ErrorCode);
this->ErrorCodeArray->InsertNextValue(info.ErrorCode);
this->ParticleAge->InsertNextValue(info.age);
//
// Interpolate all existing point attributes
......
......@@ -426,7 +426,7 @@ public:
vtkSmartPointer<vtkCharArray> ParticleSourceIds;
vtkSmartPointer<vtkIntArray> InjectedPointIds;
vtkSmartPointer<vtkIntArray> InjectedStepIds;
vtkSmartPointer<vtkIntArray> ErrorCode;
vtkSmartPointer<vtkIntArray> ErrorCodeArray;
vtkSmartPointer<vtkFloatArray> ParticleVorticity;
vtkSmartPointer<vtkFloatArray> ParticleRotation;
vtkSmartPointer<vtkFloatArray> ParticleAngularVel;
......
......@@ -2445,7 +2445,7 @@ void vtkPKdTree::InitializeProcessDataLists()
this->ProcessList = nullptr;
this->NumRegionsInProcess = nullptr;
this->RegionList = nullptr;
this->ParallelRegionList = nullptr;
this->CellCountList = nullptr;
}
......@@ -2473,9 +2473,9 @@ int vtkPKdTree::AllocateAndZeroProcessDataLists()
if (this->NumRegionsInProcess == nullptr) goto doneError3;
MakeList(this->RegionList, int * ,nProcesses);
MakeList(this->ParallelRegionList, int * ,nProcesses);
if (this->RegionList == nullptr) goto doneError3;
if (this->ParallelRegionList == nullptr) goto doneError3;
MakeList(this->CellCountList, vtkIdType * ,nRegions);
......@@ -2494,7 +2494,7 @@ void vtkPKdTree::FreeProcessDataLists()
FreeListOfLists(this->CellCountList, nRegions);
FreeListOfLists(this->RegionList, nProcesses);
FreeListOfLists(this->ParallelRegionList, nProcesses);
FreeList(this->NumRegionsInProcess);
......@@ -2686,8 +2686,8 @@ int vtkPKdTree::CreateProcessCellCountData()
if (nregs > 0)
{
this->RegionList[proc] = new int [nregs];
this->RegionList[proc][0] = -1;
this->ParallelRegionList[proc] = new int [nregs];
this->ParallelRegionList[proc][0] = -1;
}
}
......@@ -2703,7 +2703,7 @@ int vtkPKdTree::CreateProcessCellCountData()
this->AddEntry(this->ProcessList[reg],
this->NumProcessesInRegion[reg], proc);
this->AddEntry(this->RegionList[proc],
this->AddEntry(this->ParallelRegionList[proc],
this->NumRegionsInProcess[proc], reg);
}
procData++;
......@@ -3642,7 +3642,7 @@ int vtkPKdTree::GetTotalRegionsForProcess(int processId)
int vtkPKdTree::GetRegionListForProcess(int processId, vtkIntArray *regions)
{
if (!this->RegionList ||
if (!this->ParallelRegionList ||
(processId < 0) || (processId >= this->NumProcesses))
{
VTKERROR("GetRegionListForProcess - invalid request");
......@@ -3653,7 +3653,7 @@ int vtkPKdTree::GetRegionListForProcess(int processId, vtkIntArray *regions)
for (int i=0; i<nRegions; i++)
{
regions->InsertNextValue(this->RegionList[processId][i]);
regions->InsertNextValue(this->ParallelRegionList[processId][i]);
}
return nRegions;
......@@ -3673,7 +3673,7 @@ int vtkPKdTree::GetRegionsCellCountForProcess(int processId, int *count, int len
for (int i=0; i<nRegions; i++)
{
int regionId = this->RegionList[processId][i];
int regionId = this->ParallelRegionList[processId][i];
int iam;
for (iam = 0; iam < this->NumProcessesInRegion[regionId]; iam++)
......@@ -3799,7 +3799,7 @@ void vtkPKdTree::PrintTables(ostream & os, vtkIndent indent)
os << endl;
}
}
if (this->RegionList)
if (this->ParallelRegionList)
{
os << indent << "Regions held by each process:" << endl;
for (p=0; p<nprocs; p++)
......@@ -3811,7 +3811,7 @@ void vtkPKdTree::PrintTables(ostream & os, vtkIndent indent)
for (r=0; r<n; r++)
{
if (r && (r%10==0)) os << endl << indent << " ";
os << this->RegionList[p][r] << " " ;
os << this->ParallelRegionList[p][r] << " " ;
}
os << endl;
}
......@@ -3875,7 +3875,7 @@ void vtkPKdTree::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "NumProcessesInRegion: " << this->NumProcessesInRegion << endl;
os << indent << "ProcessList: " << this->ProcessList << endl;
os << indent << "NumRegionsInProcess: " << this->NumRegionsInProcess << endl;
os << indent << "RegionList: " << this->RegionList << endl;
os << indent << "ParallelRegionList: " << this->ParallelRegionList << endl;
os << indent << "CellCountList: " << this->CellCountList << endl;
os << indent << "StartVal: " << this->StartVal << endl;
......
......@@ -354,7 +354,7 @@ private:
int **ProcessList; // indexed by region ID
int *NumRegionsInProcess; // indexed by process ID
int **RegionList; // indexed by process ID
int **ParallelRegionList; // indexed by process ID
vtkIdType **CellCountList; // indexed by region ID
......
......@@ -119,13 +119,13 @@ int vtkXMLPDataSetWriter::WriteInternal()
writer->SetStartPiece(this->GetStartPiece());
writer->SetEndPiece(this->GetEndPiece());
writer->SetWriteSummaryFile(this->WriteSummaryFile);
writer->AddObserver(vtkCommand::ProgressEvent, this->ProgressObserver);
writer->AddObserver(vtkCommand::ProgressEvent, this->InternalProgressObserver);
// Try to write.
int result = writer->Write();
// Cleanup.
writer->RemoveObserver(this->ProgressObserver);
writer->RemoveObserver(this->InternalProgressObserver);
writer->Delete();
return result;
}
......
......@@ -45,10 +45,10 @@ vtkXMLPDataWriter::vtkXMLPDataWriter()
this->PieceFileNameExtension = nullptr;
// Setup a callback for the internal writer to report progress.
this->ProgressObserver = vtkCallbackCommand::New();
this->ProgressObserver->SetCallback(
this->InternalProgressObserver = vtkCallbackCommand::New();
this->InternalProgressObserver->SetCallback(
&vtkXMLPDataWriter::ProgressCallbackFunction);
this->ProgressObserver->SetClientData(this);
this->InternalProgressObserver->SetClientData(this);
this->Controller = nullptr;
this->SetController(vtkMultiProcessController::GetGlobalController());
......@@ -67,7 +67,7 @@ vtkXMLPDataWriter::~vtkXMLPDataWriter()
delete [] this->PieceFileNameExtension;
delete [] this->PieceWrittenFlags;
this->SetController(nullptr);
this->ProgressObserver->Delete();
this->InternalProgressObserver->Delete();
}
//----------------------------------------------------------------------------
......@@ -386,7 +386,7 @@ int vtkXMLPDataWriter::WritePiece(int index)
// Create the writer for the piece. Its configuration should match
// our own writer.
vtkXMLWriter* pWriter = this->CreatePieceWriter(index);
pWriter->AddObserver(vtkCommand::ProgressEvent, this->ProgressObserver);
pWriter->AddObserver(vtkCommand::ProgressEvent, this->InternalProgressObserver);
char* fileName = this->CreatePieceFileName(index, this->PathName);
std::string path = vtksys::SystemTools::GetParentDirectory(fileName);
......@@ -411,7 +411,7 @@ int vtkXMLPDataWriter::WritePiece(int index)
this->SetErrorCode(pWriter->GetErrorCode());
// Cleanup.
pWriter->RemoveObserver(this->ProgressObserver);
pWriter->RemoveObserver(this->InternalProgressObserver);
pWriter->Delete();
return result;
......
......@@ -130,7 +130,7 @@ protected:
void SplitFileName();
virtual int WritePiece(int index);
// Callback registered with the ProgressObserver.
// Callback registered with the InternalProgressObserver.
static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
void*);
// Progress callback from internal writer.
......@@ -149,7 +149,7 @@ protected:
char* PieceFileNameExtension;
// The observer to report progress from the internal writer.
vtkCallbackCommand* ProgressObserver;
vtkCallbackCommand* InternalProgressObserver;
vtkMultiProcessController* Controller;
......
......@@ -90,9 +90,9 @@ vtkXMLCompositeDataWriter::vtkXMLCompositeDataWriter()
this->WriteMetaFile = 1;
// Setup a callback for the internal writers to report progress.
this->ProgressObserver = vtkCallbackCommand::New();
this->ProgressObserver->SetCallback(&vtkXMLCompositeDataWriter::ProgressCallbackFunction);
this->ProgressObserver->SetClientData(this);
this->InternalProgressObserver = vtkCallbackCommand::New();
this->InternalProgressObserver->SetCallback(&vtkXMLCompositeDataWriter::ProgressCallbackFunction);
this->InternalProgressObserver->SetClientData(this);
this->InputInformation = nullptr;
}
......@@ -100,7 +100,7 @@ vtkXMLCompositeDataWriter::vtkXMLCompositeDataWriter()
//----------------------------------------------------------------------------
vtkXMLCompositeDataWriter::~vtkXMLCompositeDataWriter()
{
this->ProgressObserver->Delete();
this->InternalProgressObserver->Delete();
delete this->Internal;
}
......@@ -297,9 +297,9 @@ int vtkXMLCompositeDataWriter::WriteNonCompositeData(
writer->SetFileName(full.c_str());
// Write the data.
writer->AddObserver(vtkCommand::ProgressEvent, this->ProgressObserver);
writer->AddObserver(vtkCommand::ProgressEvent, this->InternalProgressObserver);
writer->Write();
writer->RemoveObserver(this->ProgressObserver);
writer->RemoveObserver(this->InternalProgressObserver);
if (writer->GetErrorCode() == vtkErrorCode::OutOfDiskSpaceError)
{
......
......@@ -162,14 +162,14 @@ protected:
*/
int WriteMetaFile;
// Callback registered with the ProgressObserver.
// Callback registered with the InternalProgressObserver.
static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
void*);
// Progress callback from internal writer.
virtual void ProgressCallback(vtkAlgorithm* w);
// The observer to report progress from the internal writer.
vtkCallbackCommand* ProgressObserver;
vtkCallbackCommand* InternalProgressObserver;
/**
* Internal method called recursively to create the xml tree for
......
......@@ -39,15 +39,15 @@ vtkStandardNewMacro(vtkXMLDataSetWriter);
vtkXMLDataSetWriter::vtkXMLDataSetWriter()
{
// Setup a callback for the internal writer to report progress.
this->ProgressObserver = vtkCallbackCommand::New();
this->ProgressObserver->SetCallback(&vtkXMLDataSetWriter::ProgressCallbackFunction);
this->ProgressObserver->SetClientData(this);
this->InternalProgressObserver = vtkCallbackCommand::New();
this->InternalProgressObserver->SetCallback(&vtkXMLDataSetWriter::ProgressCallbackFunction);
this->InternalProgressObserver->SetClientData(this);
}
//----------------------------------------------------------------------------
vtkXMLDataSetWriter::~vtkXMLDataSetWriter()
{
this->ProgressObserver->Delete();
this->InternalProgressObserver->Delete();
}
//----------------------------------------------------------------------------
......@@ -106,13 +106,13 @@ int vtkXMLDataSetWriter::WriteInternal()
writer->SetEncodeAppendedData(this->GetEncodeAppendedData());
writer->SetHeaderType(this->GetHeaderType());
writer->SetIdType(this->GetIdType());
writer->AddObserver(vtkCommand::ProgressEvent, this->ProgressObserver);
writer->AddObserver(vtkCommand::ProgressEvent, this->InternalProgressObserver);
// Try to write.
int result = writer->Write();
// Cleanup.
writer->RemoveObserver(this->ProgressObserver);
writer->RemoveObserver(this->InternalProgressObserver);
writer->Delete();
return result;
}
......
......@@ -68,15 +68,14 @@ protected:
const char* GetDataSetName() VTK_OVERRIDE;
const char* GetDefaultFileExtension() VTK_OVERRIDE;
// Callback registered with the ProgressObserver.
// Callback registered with the InternalProgressObserver.
static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
void*);
// Progress callback from internal writer.
virtual void ProgressCallback(vtkAlgorithm* w);
// The observer to report progress from the internal writer.
vtkCallbackCommand* ProgressObserver;
vtkCallbackCommand* InternalProgressObserver;
private:
vtkXMLDataSetWriter(const vtkXMLDataSetWriter&) VTK_DELETE_FUNCTION;
......
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