VTK  9.0.1
vtkBoostBreadthFirstSearch.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBoostBreadthFirstSearch.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
34 #ifndef vtkBoostBreadthFirstSearch_h
35 #define vtkBoostBreadthFirstSearch_h
36 
37 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
38 #include "vtkStdString.h" // For string type
39 #include "vtkVariant.h" // For variant type
40 
41 #include "vtkGraphAlgorithm.h"
42 
43 class vtkSelection;
44 
45 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
46 {
47 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
56  void SetOriginSelection(vtkSelection* s);
58  {
59  this->SetInputConnection(1, algOutput);
60  }
62 
67  void SetOriginVertex(vtkIdType index);
68 
76  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
77 
85  void SetOriginVertexString(char* arrayName, char* value);
86 
88 
92  vtkSetStringMacro(OutputArrayName);
94 
96 
102  vtkSetMacro(OriginFromSelection, bool);
103  vtkGetMacro(OriginFromSelection, bool);
104  vtkBooleanMacro(OriginFromSelection, bool);
106 
108 
113  vtkGetMacro(OutputSelection, bool);
114  vtkSetMacro(OutputSelection, bool);
115  vtkBooleanMacro(OutputSelection, bool);
117 
119 
124  vtkSetStringMacro(OutputSelectionType);
126 
127 protected:
129  ~vtkBoostBreadthFirstSearch() override;
130 
132 
133  virtual int FillInputPortInformation(int port, vtkInformation* info) override;
134 
135  virtual int FillOutputPortInformation(int port, vtkInformation* info) override;
136 
137 private:
138  vtkIdType OriginVertexIndex;
139  char* InputArrayName;
140  char* OutputArrayName;
141  vtkVariant OriginValue;
142  bool OutputSelection;
143  bool OriginFromSelection;
144  char* OutputSelectionType;
145 
147 
150  vtkSetStringMacro(InputArrayName);
152 
157  vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
158 
160  void operator=(const vtkBoostBreadthFirstSearch&) = delete;
161 };
162 
163 #endif
vtkStdString.h
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:51
vtkVariant.h
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkSelection
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:57
vtkGraphAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm.h
vtkGraphAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:65
vtkBoostBreadthFirstSearch
Boost breadth_first_search on a vtkGraph.
Definition: vtkBoostBreadthFirstSearch.h:45
vtkBoostBreadthFirstSearch::SetOriginSelectionConnection
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Definition: vtkBoostBreadthFirstSearch.h:57
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:75
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()