VTK
vtkSelection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSelection.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
28 #ifndef vtkSelection_h
29 #define vtkSelection_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkDataObject.h"
33 
34 class vtkSelectionNode;
35 struct vtkSelectionInternals;
36 
37 class VTKCOMMONDATAMODEL_EXPORT vtkSelection : public vtkDataObject
38 {
39 public:
40  vtkTypeMacro(vtkSelection,vtkDataObject);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42  static vtkSelection* New();
43 
47  void Initialize() VTK_OVERRIDE;
48 
52  int GetDataObjectType() VTK_OVERRIDE {return VTK_SELECTION;}
53 
58  unsigned int GetNumberOfNodes();
59 
64  virtual vtkSelectionNode* GetNode(unsigned int idx);
65 
69  virtual void AddNode(vtkSelectionNode*);
70 
72 
75  virtual void RemoveNode(unsigned int idx);
76  virtual void RemoveNode(vtkSelectionNode*);
77  virtual void RemoveAllNodes();
79 
83  void DeepCopy(vtkDataObject* src) VTK_OVERRIDE;
84 
90  void ShallowCopy(vtkDataObject* src) VTK_OVERRIDE;
91 
97  virtual void Union(vtkSelection* selection);
98 
104  virtual void Union(vtkSelectionNode* node);
105 
110  virtual void Subtract(vtkSelection* selection);
111 
116  virtual void Subtract(vtkSelectionNode* node);
117 
121  vtkMTimeType GetMTime() VTK_OVERRIDE;
122 
126  virtual void Dump();
127 
128  virtual void Dump(ostream& os);
129 
131 
135  static vtkSelection* GetData(vtkInformationVector* v, int i=0);
137 
138 protected:
139  vtkSelection();
140  ~vtkSelection() VTK_OVERRIDE;
141 
142 private:
143  vtkSelection(const vtkSelection&) VTK_DELETE_FUNCTION;
144  void operator=(const vtkSelection&) VTK_DELETE_FUNCTION;
145 
146  vtkSelectionInternals* Internal;
147 
148 };
149 
150 #endif
A node in a selection tree.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkDataObject * New()
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
A node in a selection tree.
Definition: vtkSelection.h:37
virtual void Initialize()
Restore data object to initial state,.
#define VTK_SELECTION
Definition: vtkType.h:113
a simple class to control print indentation
Definition: vtkIndent.h:33
Store zero or more vtkInformation instances.
vtkMTimeType GetMTime() override
Data objects are composite objects and need to check each part for MTime.
general representation of visualization data
Definition: vtkDataObject.h:58
virtual void DeepCopy(vtkDataObject *src)
Shallow and Deep copy.
virtual void ShallowCopy(vtkDataObject *src)
Shallow and Deep copy.