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) VTK_OVERRIDE;
48  static vtkSelection* New();
49 
53  void Initialize() VTK_OVERRIDE;
54 
58  int GetDataObjectType() VTK_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) VTK_OVERRIDE;
90 
96  void ShallowCopy(vtkDataObject* src) VTK_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() VTK_OVERRIDE;
128 
132  virtual void Dump();
133 
134  virtual void Dump(ostream& os);
135 
137 
140  static vtkSelection* GetData(vtkInformation* info);
141  static vtkSelection* GetData(vtkInformationVector* v, int i=0);
143 
144 protected:
146  ~vtkSelection() VTK_OVERRIDE;
147 
148 private:
149  vtkSelection(const vtkSelection&) VTK_DELETE_FUNCTION;
150  void operator=(const vtkSelection&) VTK_DELETE_FUNCTION;
151 
152  vtkSelectionInternals* Internal;
153 
154 };
155 
156 #endif
general representation of visualization data
Definition: vtkDataObject.h:65
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
A node in a selection tree.
A node in a selection tree.
Definition: vtkSelection.h:44
virtual void RemoveNode(unsigned int idx)
Removes a selection node.
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the properties.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkSelectionNode * GetNode(unsigned int idx)
Returns a node given it's index.
virtual void Union(vtkSelection *selection)
Union this selection with the specified selection.
void DeepCopy(vtkDataObject *src) override
Copy selection nodes of the input.
virtual void Subtract(vtkSelection *selection)
Remove the nodes from the specified selection from this selection.
virtual void Union(vtkSelectionNode *node)
Union this selection with the specified selection node.
void ShallowCopy(vtkDataObject *src) override
Copy selection nodes of the input.
virtual void AddNode(vtkSelectionNode *)
Adds a selection node.
virtual void Subtract(vtkSelectionNode *node)
Remove the nodes from the specified selection from this selection.
void Initialize() override
Restore data object to initial state,.
unsigned int GetNumberOfNodes()
Returns the number of nodes in this selection.
static vtkSelection * New()
virtual void RemoveAllNodes()
virtual void RemoveNode(vtkSelectionNode *)
@ info
Definition: vtkX3D.h:376
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
#define VTK_SELECTION
Definition: vtkType.h:109