VTK
vtkAppendSelection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAppendSelection.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 (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
31 #ifndef __vtkAppendSelection_h
32 #define __vtkAppendSelection_h
33 
34 #include "vtkSelectionAlgorithm.h"
35 
36 class vtkSelection;
37 
39 {
40 public:
41  static vtkAppendSelection *New();
42 
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
51  vtkSetMacro(UserManagedInputs,int);
52  vtkGetMacro(UserManagedInputs,int);
53  vtkBooleanMacro(UserManagedInputs,int);
55 
58  void AddInput(vtkSelection *);
59 
62  void RemoveInput(vtkSelection *);
63 
64 //BTX
66 
67  vtkSelection *GetInput(int idx);
68  vtkSelection *GetInput() { return this->GetInput( 0 ); };
69 //ETX
71 
74  void SetNumberOfInputs(int num);
75 
76  // Set Nth input, should only be used when UserManagedInputs is true.
77  void SetInputByNumber(int num, vtkSelection *input);
78 
80 
85  vtkSetMacro(AppendByUnion, int);
86  vtkGetMacro(AppendByUnion, int);
87  vtkBooleanMacro(AppendByUnion, int);
89 
90 protected:
93 
94  // Usual data generation method
95  virtual int RequestData(vtkInformation *,
97  virtual int FillInputPortInformation(int, vtkInformation *);
98 
99  private:
100  // hide the superclass' AddInput() from the user and the compiler
101  void AddInput(vtkDataObject *)
102  { vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); };
103 
104  int UserManagedInputs;
105  int AppendByUnion;
106 private:
107  vtkAppendSelection(const vtkAppendSelection&); // Not implemented.
108  void operator=(const vtkAppendSelection&); // Not implemented.
109 };
110 
111 #endif
112 
113