VTK  9.3.0
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
30#ifndef vtkBoostBreadthFirstSearch_h
31#define vtkBoostBreadthFirstSearch_h
32
33#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
34#include "vtkStdString.h" // For string type
35#include "vtkVariant.h" // For variant type
36
37#include "vtkGraphAlgorithm.h"
38
39VTK_ABI_NAMESPACE_BEGIN
40class vtkSelection;
41
42class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
55 {
56 this->SetInputConnection(1, algOutput);
57 }
59
65
73 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
74
82 void SetOriginVertexString(char* arrayName, char* value);
83
85
89 vtkSetStringMacro(OutputArrayName);
91
93
99 vtkSetMacro(OriginFromSelection, bool);
100 vtkGetMacro(OriginFromSelection, bool);
101 vtkBooleanMacro(OriginFromSelection, bool);
103
105
110 vtkGetMacro(OutputSelection, bool);
111 vtkSetMacro(OutputSelection, bool);
112 vtkBooleanMacro(OutputSelection, bool);
114
116
121 vtkSetStringMacro(OutputSelectionType);
123
124protected:
127
129
130 int FillInputPortInformation(int port, vtkInformation* info) override;
131
132 int FillOutputPortInformation(int port, vtkInformation* info) override;
133
134private:
135 vtkIdType OriginVertexIndex;
136 char* InputArrayName;
137 char* OutputArrayName;
138 vtkVariant OriginValue;
139 bool OutputSelection;
140 bool OriginFromSelection;
141 char* OutputSelectionType;
142
144
147 vtkSetStringMacro(InputArrayName);
149
154 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
155
157 void operator=(const vtkBoostBreadthFirstSearch&) = delete;
158};
159
160VTK_ABI_NAMESPACE_END
161#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:38
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:62
int vtkIdType
Definition vtkType.h:315