VTK: Common/ExecutionModel/vtkGraphAlgorithm.h Source File

| VTK 9.3.1

vtkGraphAlgorithm.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
38 #ifndef vtkGraphAlgorithm_h
39 #define vtkGraphAlgorithm_h
40
41 #include "vtkAlgorithm.h"
42 #include "vtkCommonExecutionModelModule.h" // For export macro
43 #include "vtkGraph.h" // makes things a bit easier
44
45 VTK_ABI_NAMESPACE_BEGIN
46 class vtkDataSet;
47
48 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkGraphAlgorithm : public vtkAlgorithm
49 {
50 public:
51 static vtkGraphAlgorithm* New();
52 vtkTypeMacro(vtkGraphAlgorithm, vtkAlgorithm);
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 vtkTypeBool ProcessRequest(
59 vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
60
64 vtkGraph* GetOutput() { return this->GetOutput(0); }
65 vtkGraph* GetOutput(int index);
66
72 void SetInputData(vtkDataObject* obj) { this->SetInputData(0, obj); }
73 void SetInputData(int index, vtkDataObject* obj);
74
75 protected:
76 vtkGraphAlgorithm();
77 ~vtkGraphAlgorithm() override;
78
79 // convenience method
80 virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
81 vtkInformationVector* outputVector);
82
83 virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
84 vtkInformationVector* outputVector);
85
90 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
91 vtkInformationVector* outputVector);
92
97 virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
98
99 // see algorithm for more info
100 int FillOutputPortInformation(int port, vtkInformation* info) override;
101 int FillInputPortInformation(int port, vtkInformation* info) override;
102
103 private:
104 vtkGraphAlgorithm(const vtkGraphAlgorithm&) = delete;
105 void operator=(const vtkGraphAlgorithm&) = delete;
106 };
107
108 VTK_ABI_NAMESPACE_END
109 #endif
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:49
vtkGraphAlgorithm::~vtkGraphAlgorithm
~vtkGraphAlgorithm() override
vtkGraphAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()
vtkGraphAlgorithm::GetOutput
vtkGraph * GetOutput(int index)
vtkGraphAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkGraphAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkGraphAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkGraphAlgorithm::vtkGraphAlgorithm
vtkGraphAlgorithm()
vtkGraphAlgorithm::SetInputData
void SetInputData(vtkDataObject *obj)
Assign a data object as input.
Definition: vtkGraphAlgorithm.h:72
vtkGraphAlgorithm::SetInputData
void SetInputData(int index, vtkDataObject *obj)
vtkGraphAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkGraphAlgorithm::GetOutput
vtkGraph * GetOutput()
Get the output data object for a port on this algorithm.
Definition: vtkGraphAlgorithm.h:64
vtkGraphAlgorithm::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:290
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkAlgorithm.h
vtkGraph.h