Commit f68b4af2 authored by Berk Geveci's avatar Berk Geveci
Browse files

COMP: Fixing java wrapping problems

parent e847f4ae
......@@ -289,6 +289,7 @@ vtkViewport
SET_SOURCE_FILES_PROPERTIES(
vtkFilteringInformationKeyManager.cxx
vtkHierarchicalDataIterator.cxx
vtkImageIterator.cxx
vtkImageProgressIterator.cxx
WRAP_EXCLUDE
......
......@@ -23,13 +23,15 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkCxxRevisionMacro(vtkHierarchicalDataSetAlgorithm, "1.7");
vtkCxxRevisionMacro(vtkHierarchicalDataSetAlgorithm, "1.8");
vtkStandardNewMacro(vtkHierarchicalDataSetAlgorithm);
//----------------------------------------------------------------------------
// Instantiate object so that cell data is not passed to output.
vtkHierarchicalDataSetAlgorithm::vtkHierarchicalDataSetAlgorithm()
{
this->SetNumberOfInputPorts(1);
this->SetNumberOfOutputPorts(1);
}
//----------------------------------------------------------------------------
......@@ -47,6 +49,82 @@ vtkHierarchicalDataSet* vtkHierarchicalDataSetAlgorithm::GetOutput(int port)
return vtkHierarchicalDataSet::SafeDownCast(output);
}
//----------------------------------------------------------------------------
void vtkHierarchicalDataSetAlgorithm::SetInput(vtkDataObject* input)
{
this->SetInput(0, input);
}
//----------------------------------------------------------------------------
void vtkHierarchicalDataSetAlgorithm::SetInput(int index, vtkDataObject* input)
{
if(input)
{
this->SetInputConnection(index, input->GetProducerPort());
}
else
{
// Setting a NULL input removes the connection.
this->SetInputConnection(index, 0);
}
}
//----------------------------------------------------------------------------
vtkDataObject* vtkHierarchicalDataSetAlgorithm::GetInput(int port)
{
if (this->GetNumberOfInputConnections(port) < 1)
{
return 0;
}
return this->GetExecutive()->GetInputData(port, 0);
}
//----------------------------------------------------------------------------
int vtkHierarchicalDataSetAlgorithm::ProcessRequest(
vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
// create the output
if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT()))
{
return this->RequestDataObject(request, inputVector, outputVector);
}
// generate the data
if(request->Has(vtkCompositeDataPipeline::REQUEST_DATA()))
{
int retVal = this->RequestData(request, inputVector, outputVector);
return retVal;
}
// execute information
if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
{
if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()))
{
int outputPort = request->Get(
vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT());
vtkInformation* info = outputVector->GetInformationObject(outputPort);
if (info)
{
info->Set(
vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1);
}
}
return this->RequestInformation(request, inputVector, outputVector);
}
// set update extent
if(request->Has(
vtkCompositeDataPipeline::REQUEST_UPDATE_EXTENT()))
{
return this->RequestUpdateExtent(request, inputVector, outputVector);
}
return this->Superclass::ProcessRequest(request, inputVector, outputVector);
}
//----------------------------------------------------------------------------
int vtkHierarchicalDataSetAlgorithm::FillOutputPortInformation(
int vtkNotUsed(port), vtkInformation* info)
......@@ -68,6 +146,12 @@ int vtkHierarchicalDataSetAlgorithm::FillInputPortInformation(
return 1;
}
//----------------------------------------------------------------------------
vtkExecutive* vtkHierarchicalDataSetAlgorithm::CreateDefaultExecutive()
{
return vtkCompositeDataPipeline::New();
}
//----------------------------------------------------------------------------
void vtkHierarchicalDataSetAlgorithm::PrintSelf(ostream& os, vtkIndent indent)
{
......
......@@ -22,15 +22,15 @@
#ifndef __vtkHierarchicalDataSetAlgorithm_h
#define __vtkHierarchicalDataSetAlgorithm_h
#include "vtkMultiGroupDataSetAlgorithm.h"
#include "vtkAlgorithm.h"
class vtkHierarchicalDataSet;
class VTK_FILTERING_EXPORT vtkHierarchicalDataSetAlgorithm : public vtkMultiGroupDataSetAlgorithm
class VTK_FILTERING_EXPORT vtkHierarchicalDataSetAlgorithm : public vtkAlgorithm
{
public:
static vtkHierarchicalDataSetAlgorithm *New();
vtkTypeRevisionMacro(vtkHierarchicalDataSetAlgorithm,vtkMultiGroupDataSetAlgorithm);
vtkTypeRevisionMacro(vtkHierarchicalDataSetAlgorithm,vtkAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -38,14 +38,67 @@ public:
vtkHierarchicalDataSet* GetOutput();
vtkHierarchicalDataSet* GetOutput(int);
// Description:
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject*);
void SetInput(int, vtkDataObject*);
// Description:
// see vtkAlgorithm for details
virtual int ProcessRequest(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
protected:
vtkHierarchicalDataSetAlgorithm();
~vtkHierarchicalDataSetAlgorithm() {};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestDataObject(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*) {return 1;};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestInformation(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*) {return 1;};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestData(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*) {return 1;};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestUpdateExtent(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*)
{
return 1;
};
// Create a default executive.
virtual vtkExecutive* CreateDefaultExecutive();
// see algorithm for more info
virtual int FillOutputPortInformation(int port, vtkInformation* info);
virtual int FillInputPortInformation(int port, vtkInformation* info);
vtkDataObject *GetInput(int port);
private:
vtkHierarchicalDataSetAlgorithm(const vtkHierarchicalDataSetAlgorithm&); // Not implemented.
void operator=(const vtkHierarchicalDataSetAlgorithm&); // Not implemented.
......
......@@ -23,13 +23,15 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkCxxRevisionMacro(vtkMultiBlockDataSetAlgorithm, "1.4");
vtkCxxRevisionMacro(vtkMultiBlockDataSetAlgorithm, "1.5");
vtkStandardNewMacro(vtkMultiBlockDataSetAlgorithm);
//----------------------------------------------------------------------------
// Instantiate object so that cell data is not passed to output.
vtkMultiBlockDataSetAlgorithm::vtkMultiBlockDataSetAlgorithm()
{
this->SetNumberOfInputPorts(1);
this->SetNumberOfOutputPorts(1);
}
//----------------------------------------------------------------------------
......@@ -47,6 +49,82 @@ vtkMultiBlockDataSet* vtkMultiBlockDataSetAlgorithm::GetOutput(int port)
return vtkMultiBlockDataSet::SafeDownCast(output);
}
//----------------------------------------------------------------------------
void vtkMultiBlockDataSetAlgorithm::SetInput(vtkDataObject* input)
{
this->SetInput(0, input);
}
//----------------------------------------------------------------------------
void vtkMultiBlockDataSetAlgorithm::SetInput(int index, vtkDataObject* input)
{
if(input)
{
this->SetInputConnection(index, input->GetProducerPort());
}
else
{
// Setting a NULL input removes the connection.
this->SetInputConnection(index, 0);
}
}
//----------------------------------------------------------------------------
vtkDataObject* vtkMultiBlockDataSetAlgorithm::GetInput(int port)
{
if (this->GetNumberOfInputConnections(port) < 1)
{
return 0;
}
return this->GetExecutive()->GetInputData(port, 0);
}
//----------------------------------------------------------------------------
int vtkMultiBlockDataSetAlgorithm::ProcessRequest(
vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
// create the output
if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT()))
{
return this->RequestDataObject(request, inputVector, outputVector);
}
// generate the data
if(request->Has(vtkCompositeDataPipeline::REQUEST_DATA()))
{
int retVal = this->RequestData(request, inputVector, outputVector);
return retVal;
}
// execute information
if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
{
if(request->Has(vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT()))
{
int outputPort = request->Get(
vtkStreamingDemandDrivenPipeline::FROM_OUTPUT_PORT());
vtkInformation* info = outputVector->GetInformationObject(outputPort);
if (info)
{
info->Set(
vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), -1);
}
}
return this->RequestInformation(request, inputVector, outputVector);
}
// set update extent
if(request->Has(
vtkCompositeDataPipeline::REQUEST_UPDATE_EXTENT()))
{
return this->RequestUpdateExtent(request, inputVector, outputVector);
}
return this->Superclass::ProcessRequest(request, inputVector, outputVector);
}
//----------------------------------------------------------------------------
int vtkMultiBlockDataSetAlgorithm::FillOutputPortInformation(
int vtkNotUsed(port), vtkInformation* info)
......@@ -68,6 +146,12 @@ int vtkMultiBlockDataSetAlgorithm::FillInputPortInformation(
return 1;
}
//----------------------------------------------------------------------------
vtkExecutive* vtkMultiBlockDataSetAlgorithm::CreateDefaultExecutive()
{
return vtkCompositeDataPipeline::New();
}
//----------------------------------------------------------------------------
void vtkMultiBlockDataSetAlgorithm::PrintSelf(ostream& os, vtkIndent indent)
{
......
......@@ -22,15 +22,15 @@
#ifndef __vtkMultiBlockDataSetAlgorithm_h
#define __vtkMultiBlockDataSetAlgorithm_h
#include "vtkMultiGroupDataSetAlgorithm.h"
#include "vtkAlgorithm.h"
class vtkMultiBlockDataSet;
class VTK_FILTERING_EXPORT vtkMultiBlockDataSetAlgorithm : public vtkMultiGroupDataSetAlgorithm
class VTK_FILTERING_EXPORT vtkMultiBlockDataSetAlgorithm : public vtkAlgorithm
{
public:
static vtkMultiBlockDataSetAlgorithm *New();
vtkTypeRevisionMacro(vtkMultiBlockDataSetAlgorithm,vtkMultiGroupDataSetAlgorithm);
vtkTypeRevisionMacro(vtkMultiBlockDataSetAlgorithm,vtkAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -38,14 +38,67 @@ public:
vtkMultiBlockDataSet* GetOutput();
vtkMultiBlockDataSet* GetOutput(int);
// Description:
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject*);
void SetInput(int, vtkDataObject*);
// Description:
// see vtkAlgorithm for details
virtual int ProcessRequest(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
protected:
vtkMultiBlockDataSetAlgorithm();
~vtkMultiBlockDataSetAlgorithm() {};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestDataObject(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*) {return 1;};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestInformation(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*) {return 1;};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestData(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*) {return 1;};
// Description:
// This is called by the superclass.
// This is the method you should override.
virtual int RequestUpdateExtent(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*)
{
return 1;
};
// Create a default executive.
virtual vtkExecutive* CreateDefaultExecutive();
// see algorithm for more info
virtual int FillOutputPortInformation(int port, vtkInformation* info);
virtual int FillInputPortInformation(int port, vtkInformation* info);
vtkDataObject *GetInput(int port);
private:
vtkMultiBlockDataSetAlgorithm(const vtkMultiBlockDataSetAlgorithm&); // Not implemented.
void operator=(const vtkMultiBlockDataSetAlgorithm&); // Not implemented.
......
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