VTK
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 -------------------------------------------------------------------------*/
39 #ifndef __vtkBoostBreadthFirstSearch_h
40 #define __vtkBoostBreadthFirstSearch_h
41 
42 #include "vtkStdString.h" // For string type
43 #include "vtkVariant.h" // For variant type
44 
45 #include "vtkGraphAlgorithm.h"
46 
47 class vtkSelection;
48 
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
58  void SetOriginSelection(vtkSelection *s);
59  void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput)
60  {
61  this->SetInputConnection(1, algOutput);
62  }
64 
67  void SetOriginVertex(vtkIdType index);
68 
73  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
74 
79  void SetOriginVertexString(char* arrayName, char* value);
80 
82 
84  vtkSetStringMacro(OutputArrayName);
86 
88 
92  vtkSetMacro(OriginFromSelection, bool);
93  vtkGetMacro(OriginFromSelection, bool);
94  vtkBooleanMacro(OriginFromSelection, bool);
96 
98 
101  vtkGetMacro(OutputSelection, bool);
102  vtkSetMacro(OutputSelection, bool);
103  vtkBooleanMacro(OutputSelection, bool);
105 
107 
110  vtkSetStringMacro(OutputSelectionType);
112 
113 protected:
116 
117  virtual int RequestData(
118  vtkInformation *,
121 
122  virtual int FillInputPortInformation(
123  int port, vtkInformation* info);
124 
125  virtual int FillOutputPortInformation(
126  int port, vtkInformation* info);
127 
128 private:
129 
130  vtkIdType OriginVertexIndex;
131  char* InputArrayName;
132  char* OutputArrayName;
133  vtkVariant OriginValue;
134  bool OutputSelection;
135  bool OriginFromSelection;
136  char* OutputSelectionType;
137 
139 
140  vtkSetStringMacro(InputArrayName);
142 
144 
146  vtkIdType GetVertexIndex(
147  vtkAbstractArray *abstract,vtkVariant value);
149 
150  vtkBoostBreadthFirstSearch(const vtkBoostBreadthFirstSearch&); // Not implemented.
151  void operator=(const vtkBoostBreadthFirstSearch&); // Not implemented.
152 };
153 
154 #endif