VTK  9.1.0
vtkGraphAlgorithm.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGraphAlgorithm.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2008 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
81#ifndef vtkGraphAlgorithm_h
82#define vtkGraphAlgorithm_h
83
84#include "vtkAlgorithm.h"
85#include "vtkCommonExecutionModelModule.h" // For export macro
86#include "vtkGraph.h" // makes things a bit easier
87
88class vtkDataSet;
89
90class VTKCOMMONEXECUTIONMODEL_EXPORT vtkGraphAlgorithm : public vtkAlgorithm
91{
92public:
95 void PrintSelf(ostream& os, vtkIndent indent) override;
96
102
106 vtkGraph* GetOutput() { return this->GetOutput(0); }
107 vtkGraph* GetOutput(int index);
108
114 void SetInputData(vtkDataObject* obj) { this->SetInputData(0, obj); }
115 void SetInputData(int index, vtkDataObject* obj);
116
117protected:
120
121 // convenience method
122 virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
123 vtkInformationVector* outputVector);
124
125 virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
126 vtkInformationVector* outputVector);
127
132 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
133 vtkInformationVector* outputVector);
134
140
141 // see algorithm for more info
142 int FillOutputPortInformation(int port, vtkInformation* info) override;
143 int FillInputPortInformation(int port, vtkInformation* info) override;
144
145private:
146 vtkGraphAlgorithm(const vtkGraphAlgorithm&) = delete;
147 void operator=(const vtkGraphAlgorithm&) = delete;
148};
149
150#endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:123
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
Superclass for algorithms that produce only graph as output.
~vtkGraphAlgorithm() override
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkGraph * GetOutput()
Get the output data object for a port on this algorithm.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkGraph * GetOutput(int index)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
static vtkGraphAlgorithm * New()
void SetInputData(vtkDataObject *obj)
Assign a data object as input.
void SetInputData(int index, vtkDataObject *obj)
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
Base class for graph data types.
Definition: vtkGraph.h:339
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition: vtkABI.h:69