VTK  9.3.20240424
vtkBoostBreadthFirstSearch.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
50#ifndef vtkBoostBreadthFirstSearch_h
51#define vtkBoostBreadthFirstSearch_h
52
53#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
54#include "vtkStdString.h" // For string type
55#include "vtkVariant.h" // For variant type
56
57#include "vtkGraphAlgorithm.h"
58
59VTK_ABI_NAMESPACE_BEGIN
60class vtkSelection;
61
62class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
63{
64public:
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
70
75 {
76 this->SetInputConnection(1, algOutput);
77 }
79
85
93 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
94
102 void SetOriginVertexString(char* arrayName, char* value);
103
105
109 vtkSetStringMacro(OutputArrayName);
111
113
119 vtkSetMacro(OriginFromSelection, bool);
120 vtkGetMacro(OriginFromSelection, bool);
121 vtkBooleanMacro(OriginFromSelection, bool);
123
125
130 vtkGetMacro(OutputSelection, bool);
131 vtkSetMacro(OutputSelection, bool);
132 vtkBooleanMacro(OutputSelection, bool);
134
136
141 vtkSetStringMacro(OutputSelectionType);
143
144protected:
147
149
150 int FillInputPortInformation(int port, vtkInformation* info) override;
151
152 int FillOutputPortInformation(int port, vtkInformation* info) override;
153
154private:
155 vtkIdType OriginVertexIndex;
156 char* InputArrayName;
157 char* OutputArrayName;
158 vtkVariant OriginValue;
159 bool OutputSelection;
160 bool OriginFromSelection;
161 char* OutputSelectionType;
162
164
167 vtkSetStringMacro(InputArrayName);
169
174 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
175
177 void operator=(const vtkBoostBreadthFirstSearch&) = delete;
178};
179
180VTK_ABI_NAMESPACE_END
181#endif
Abstract superclass for all arrays.
Proxy object to connect input/output ports.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
Boost breadth_first_search on a vtkGraph.
void SetOriginVertexString(char *arrayName, char *value)
Convenience method for setting the origin vertex given an array name and string value.
void SetOriginSelection(vtkSelection *s)
Convenience methods for setting the origin selection input.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set the breadth first search 'origin' vertex.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkBoostBreadthFirstSearch * New()
~vtkBoostBreadthFirstSearch() override
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the breadth first search 'origin' vertex.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Convenience methods for setting the origin selection input.
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
data object that represents a "selection" in VTK.
Wrapper around std::string to keep symbols short.
A type representing the union of many types.
Definition vtkVariant.h:162
int vtkIdType
Definition vtkType.h:315