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
21#ifndef vtkBoostBreadthFirstSearch_h
22#define vtkBoostBreadthFirstSearch_h
23
24#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
25#include "vtkStdString.h" // For string type
26#include "vtkVariant.h" // For variant type
27
28#include "vtkGraphAlgorithm.h"
29
30VTK_ABI_NAMESPACE_BEGIN
31class vtkSelection;
32
33class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
41
46 {
47 this->SetInputConnection(1, algOutput);
48 }
50
56
64 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
65
73 void SetOriginVertexString(char* arrayName, char* value);
74
76
80 vtkSetStringMacro(OutputArrayName);
82
84
90 vtkSetMacro(OriginFromSelection, bool);
91 vtkGetMacro(OriginFromSelection, bool);
92 vtkBooleanMacro(OriginFromSelection, bool);
94
96
101 vtkGetMacro(OutputSelection, bool);
102 vtkSetMacro(OutputSelection, bool);
103 vtkBooleanMacro(OutputSelection, bool);
105
107
112 vtkSetStringMacro(OutputSelectionType);
114
115protected:
118
120
121 int FillInputPortInformation(int port, vtkInformation* info) override;
122
123 int FillOutputPortInformation(int port, vtkInformation* info) override;
124
125private:
126 vtkIdType OriginVertexIndex;
127 char* InputArrayName;
128 char* OutputArrayName;
129 vtkVariant OriginValue;
130 bool OutputSelection;
131 bool OriginFromSelection;
132 char* OutputSelectionType;
133
135
138 vtkSetStringMacro(InputArrayName);
140
145 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
146
148 void operator=(const vtkBoostBreadthFirstSearch&) = delete;
149};
150
151VTK_ABI_NAMESPACE_END
152#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:29
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:53
int vtkIdType
Definition vtkType.h:315