VTK
vtkPBGLCollectGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBGLCollectGraph.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 -------------------------------------------------------------------------*/
50 #ifndef __vtkPBGLCollectGraph_h
51 #define __vtkPBGLCollectGraph_h
52 
53 #include "vtkStdString.h" // For string type
54 
55 #include <vtksys/stl/utility> // for pair
56 #include <vtksys/stl/numeric> // for accumulate, partial_sum
57 #include <vtksys/stl/functional> // for plus
58 
59 #include "vtkGraphAlgorithm.h"
60 
61 class vtkSelection;
63 
65 {
66 public:
67  static vtkPBGLCollectGraph *New();
69  void PrintSelf(ostream& os, vtkIndent indent);
70 
72 
76  vtkGetMacro(TargetProcessor, int);
77  vtkSetMacro(TargetProcessor, int);
79 
81 
85  vtkGetMacro(ReplicateGraph, bool);
86  vtkSetMacro(ReplicateGraph, bool);
87  vtkBooleanMacro(ReplicateGraph, bool);
89 
91 
93  vtkGetMacro(CopyVertexData, bool);
94  vtkSetMacro(CopyVertexData, bool);
95  vtkBooleanMacro(CopyVertexData, bool);
97 
99 
101  vtkGetMacro(CopyEdgeData, bool);
102  vtkSetMacro(CopyEdgeData, bool);
103  vtkBooleanMacro(CopyEdgeData, bool);
105 
107 
110  vtkGetMacro(CreateOriginProcessArray, bool);
111  vtkSetMacro(CreateOriginProcessArray, bool);
112  vtkBooleanMacro(CreateOriginProcessArray, bool);
114 
116 
118  vtkSetStringMacro(OriginProcessArrayName);
120 
121 protected:
124 
125  virtual int RequestData(
126  vtkInformation *,
129 
130  virtual int FillInputPortInformation(
131  int port, vtkInformation* info);
132 
133  virtual int FillOutputPortInformation(
134  int port, vtkInformation* info);
135 
137 
140  void CopyStructureOfDataSetAttributes(vtkDataSetAttributes *inAttrs,
141  vtkDataSetAttributes *outAttrs,
142  vtkIdType numberOfTuples);
144 
145 private:
146  int TargetProcessor;
147  bool ReplicateGraph;
148  bool CopyVertexData;
149  bool CopyEdgeData;
150  bool CreateOriginProcessArray;
151  char * OriginProcessArrayName;
152 
153  vtkPBGLCollectGraph(const vtkPBGLCollectGraph&); // Not implemented.
154  void operator=(const vtkPBGLCollectGraph&); // Not implemented.
155 
156 };
157 
158 #endif