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
29 #ifndef vtkGraphAlgorithm_h
30 #define vtkGraphAlgorithm_h
31 
32 #include "vtkAlgorithm.h"
33 #include "vtkCommonExecutionModelModule.h" // For export macro
34 #include "vtkGraph.h" // makes things a bit easier
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkDataSet;
38 
39 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkGraphAlgorithm : public vtkAlgorithm
40 {
41 public:
42  static vtkGraphAlgorithm* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
51 
55  vtkGraph* GetOutput() { return this->GetOutput(0); }
56  vtkGraph* GetOutput(int index);
57 
63  void SetInputData(vtkDataObject* obj) { this->SetInputData(0, obj); }
64  void SetInputData(int index, vtkDataObject* obj);
65 
66 protected:
68  ~vtkGraphAlgorithm() override;
69 
70  // convenience method
71  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
72  vtkInformationVector* outputVector);
73 
74  virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
75  vtkInformationVector* outputVector);
76 
81  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
82  vtkInformationVector* outputVector);
83 
88  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
89 
90  // see algorithm for more info
93 
94 private:
95  vtkGraphAlgorithm(const vtkGraphAlgorithm&) = delete;
96  void operator=(const vtkGraphAlgorithm&) = delete;
97 };
98 
99 VTK_ABI_NAMESPACE_END
100 #endif
void SetInputData(vtkDataObject *obj)
Assign a data object as input.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for algorithms that produce only graph as output.
vtkGraph * GetOutput()
Get the output data object for a port on this algorithm.
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Base class for graph data types.
Definition: vtkGraph.h:280
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:54