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 =========================================================================*/
34 #ifndef vtkSelection_h
35 #define vtkSelection_h
36 
37 #include "vtkCommonDataModelModule.h" // For export macro
38 #include "vtkDataObject.h"
39 
40 class vtkSelectionNode;
41 struct vtkSelectionInternals;
42 
43 class VTKCOMMONDATAMODEL_EXPORT vtkSelection : public vtkDataObject
44 {
45 public:
46  vtkTypeMacro(vtkSelection,vtkDataObject);
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48  static vtkSelection* New();
49 
53  void Initialize() override;
54 
58  int GetDataObjectType() override {return VTK_SELECTION;}
59 
64  unsigned int GetNumberOfNodes();
65 
70  virtual vtkSelectionNode* GetNode(unsigned int idx);
71 
75  virtual void AddNode(vtkSelectionNode*);
76 
78 
81  virtual void RemoveNode(unsigned int idx);
82  virtual void RemoveNode(vtkSelectionNode*);
83  virtual void RemoveAllNodes();
85 
89  void DeepCopy(vtkDataObject* src) override;
90 
96  void ShallowCopy(vtkDataObject* src) override;
97 
103  virtual void Union(vtkSelection* selection);
104 
110  virtual void Union(vtkSelectionNode* node);
111 
116  virtual void Subtract(vtkSelection* selection);
117 
122  virtual void Subtract(vtkSelectionNode* node);
123 
127  vtkMTimeType GetMTime() override;
128 
132  virtual void Dump();
133 
134  virtual void Dump(ostream& os);
135 
137 
141  static vtkSelection* GetData(vtkInformationVector* v, int i=0);
143 
144 protected:
145  vtkSelection();
146  ~vtkSelection() override;
147 
148 private:
149  vtkSelection(const vtkSelection&) = delete;
150  void operator=(const vtkSelection&) = delete;
151 
152  vtkSelectionInternals* Internal;
153 
154 };
155 
156 #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:43
virtual void Initialize()
Restore data object to initial state,.
int GetDataObjectType() override
Returns VTK_SELECTION enumeration value.
Definition: vtkSelection.h:58
#define VTK_SELECTION
Definition: vtkType.h:113
a simple class to control print indentation
Definition: vtkIndent.h:39
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:64
virtual void DeepCopy(vtkDataObject *src)
Shallow and Deep copy.
virtual void ShallowCopy(vtkDataObject *src)
Shallow and Deep copy.