VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Infovis/BoostGraphAlgorithms/vtkBoostBreadthFirstSearch.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBoostBreadthFirstSearch.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00039 #ifndef vtkBoostBreadthFirstSearch_h
00040 #define vtkBoostBreadthFirstSearch_h
00041 
00042 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
00043 #include "vtkStdString.h" // For string type
00044 #include "vtkVariant.h" // For variant type
00045 
00046 #include "vtkGraphAlgorithm.h"
00047 
00048 class vtkSelection;
00049 
00050 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
00051 {
00052 public:
00053   static vtkBoostBreadthFirstSearch *New();
00054   vtkTypeMacro(vtkBoostBreadthFirstSearch, vtkGraphAlgorithm);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058 
00059   void SetOriginSelection(vtkSelection *s);
00060   void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput)
00061   {
00062     this->SetInputConnection(1, algOutput);
00063   }
00065 
00068   void SetOriginVertex(vtkIdType index);
00069 
00074   void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00075 
00080   void SetOriginVertexString(char* arrayName, char* value);
00081 
00083 
00085   vtkSetStringMacro(OutputArrayName);
00087 
00089 
00093   vtkSetMacro(OriginFromSelection, bool);
00094   vtkGetMacro(OriginFromSelection, bool);
00095   vtkBooleanMacro(OriginFromSelection, bool);
00097 
00099 
00102   vtkGetMacro(OutputSelection, bool);
00103   vtkSetMacro(OutputSelection, bool);
00104   vtkBooleanMacro(OutputSelection, bool);
00106 
00108 
00111   vtkSetStringMacro(OutputSelectionType);
00113 
00114 protected:
00115   vtkBoostBreadthFirstSearch();
00116   ~vtkBoostBreadthFirstSearch();
00117 
00118   virtual int RequestData(
00119     vtkInformation *,
00120     vtkInformationVector **,
00121     vtkInformationVector *);
00122 
00123   virtual int FillInputPortInformation(
00124     int port, vtkInformation* info);
00125 
00126   virtual int FillOutputPortInformation(
00127     int port, vtkInformation* info);
00128 
00129 private:
00130 
00131   vtkIdType OriginVertexIndex;
00132   char* InputArrayName;
00133   char* OutputArrayName;
00134   vtkVariant OriginValue;
00135   bool OutputSelection;
00136   bool OriginFromSelection;
00137   char* OutputSelectionType;
00138 
00140 
00141   vtkSetStringMacro(InputArrayName);
00143 
00145 
00147   vtkIdType GetVertexIndex(
00148     vtkAbstractArray *abstract,vtkVariant value);
00150 
00151   vtkBoostBreadthFirstSearch(const vtkBoostBreadthFirstSearch&);  // Not implemented.
00152   void operator=(const vtkBoostBreadthFirstSearch&);  // Not implemented.
00153 };
00154 
00155 #endif