VTK  9.3.1
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 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkSelection;
32 
33 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  void SetOriginSelection(vtkSelection* s);
46  {
47  this->SetInputConnection(1, algOutput);
48  }
50 
55  void SetOriginVertex(vtkIdType index);
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 
115 protected:
117  ~vtkBoostBreadthFirstSearch() override;
118 
120 
121  int FillInputPortInformation(int port, vtkInformation* info) override;
122 
124 
125 private:
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 
151 VTK_ABI_NAMESPACE_END
152 #endif
static vtkGraphAlgorithm * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
Boost breadth_first_search on a vtkGraph.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:49
int vtkIdType
Definition: vtkType.h:315
Superclass for algorithms that produce only graph as output.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
A type representing the union of many types.
Definition: vtkVariant.h:52
Proxy object to connect input/output ports.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Convenience methods for setting the origin selection input.
a simple class to control print indentation
Definition: vtkIndent.h:28
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port 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.
Store zero or more vtkInformation instances.