VTK  9.7.1
vtkSumTables.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkSumTables_h
20 #define vtkSumTables_h
21 
22 #include "vtkDataArray.h" // For numeric key columns
23 #include "vtkFiltersGeneralModule.h" // For export macro
24 #include "vtkStringArray.h" // For string key columns
25 #include "vtkTable.h" // For table inputs
26 #include "vtkTableAlgorithm.h"
27 
28 #include <map> // For left and right key maps
29 #include <string> // For LeftKey and RightKey
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 
33 class VTKFILTERSGENERAL_EXPORT vtkSumTables : public vtkTableAlgorithm
34 {
35 public:
36  static vtkSumTables* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
44  void SetSourceConnection(vtkAlgorithmOutput* source);
45 
50  void SetSourceData(vtkTable* source);
51 
61  static bool SumTables(
62  vtkTable* aa, vtkTable* bb, bool checkOnly = false, bool allowAbstractColumns = false);
63 
64 protected:
65  vtkSumTables();
66  ~vtkSumTables() override = default;
67 
69  int FillInputPortInformation(int, vtkInformation*) override;
70 
71 private:
72  vtkSumTables(const vtkSumTables&) = delete;
73  void operator=(const vtkSumTables&) = delete;
74 };
75 
76 VTK_ABI_NAMESPACE_END
77 
78 #endif // vtkSumTables_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
Proxy object to connect input/output ports.
Matrix-like summation of tables.
Definition: vtkSumTables.h:33
a simple class to control print indentation
Definition: vtkIndent.h:28
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:59
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.