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 
39 VTK_ABI_NAMESPACE_BEGIN
40 class vtkSelection;
41 
42 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
55  {
56  this->SetInputConnection(1, algOutput);
57  }
59 
65 
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 
124 protected:
127 
129 
131 
133 
134 private:
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 
160 VTK_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.
static vtkBoostBreadthFirstSearch * New()
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.
~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.
Definition: vtkSelection.h:59
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
A type representing the union of many types.
Definition: vtkVariant.h:62
@ info
Definition: vtkX3D.h:376
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ index
Definition: vtkX3D.h:246
int vtkIdType
Definition: vtkType.h:315