File: vtkSelection.h

package info (click to toggle)
vtk 5.4.2-8
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 94,592 kB
  • ctags: 125,784
  • sloc: cpp: 895,924; ansic: 467,481; tcl: 46,607; python: 17,336; xml: 6,774; perl: 3,111; java: 1,992; yacc: 1,148; asm: 471; lex: 268; makefile: 170; sh: 126
file content (114 lines) | stat: -rw-r--r-- 3,491 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*=========================================================================

  Program:   ParaView
  Module:    $RCSfile: vtkSelection.h,v $

  Copyright (c) Kitware, Inc.
  All rights reserved.
  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkSelection - A node in a selection tree. Used to store selection results.
// .SECTION Description

// vtkSelection is a collection of vtkSelectionNode objects, each of which
// contains information about a piece of the whole selection. Each selection
// node may contain different types of selections.
//
// .SECTION See Also 
// vtkSelectionNode

#ifndef __vtkSelection_h
#define __vtkSelection_h

#include "vtkDataObject.h"

//BTX
class vtkSelectionNode;
struct vtkSelectionInternals;
//ETX

class VTK_FILTERING_EXPORT vtkSelection : public vtkDataObject
{
public:
  vtkTypeRevisionMacro(vtkSelection,vtkDataObject);
  void PrintSelf(ostream& os, vtkIndent indent);
  static vtkSelection* New();

  // Description:
  // Restore data object to initial state,
  virtual void Initialize();
  
  // Description:
  // Returns VTK_SELECTION enumeration value.
  virtual int GetDataObjectType() {return VTK_SELECTION;}

  // Description: 
  // Returns the number of nodes in this selection.
  // Each node contains information about part of the selection.
  unsigned int GetNumberOfNodes();

  // Description: 
  // Returns a node given it's index. Performs bound checking
  // and will return 0 if out-of-bounds.
  virtual vtkSelectionNode* GetNode(unsigned int idx);

  // Description: 
  // Adds a selection node.
  virtual void AddNode(vtkSelectionNode*);

  // Description: 
  // Removes a selection node.
  virtual void RemoveNode(unsigned int idx);
  virtual void RemoveNode(vtkSelectionNode*);
  virtual void RemoveAllNodes();

  // Description: 
  // Copy selection nodes of the input.
  virtual void DeepCopy(vtkDataObject* src);

  // Description: 
  // Copy selection nodes of the input.
  // This is a shallow copy: selection lists and pointers in the
  // properties are passed by reference.
  virtual void ShallowCopy(vtkDataObject* src);

  // Description:
  // Union this selection with the specified selection.
  // Attempts to reuse selection nodes in this selection if properties
  // match exactly. Otherwise, creates new selection nodes.
  virtual void Union(vtkSelection* selection);

  // Description:
  // Union this selection with the specified selection node.
  // Attempts to reuse a selection node in this selection if properties
  // match exactly. Otherwise, creates a new selection node.
  virtual void Union(vtkSelectionNode* node);

  // Description:
  // Return the MTime taking into account changes to the properties
  unsigned long GetMTime();

  // Description:
  // Retrieve a vtkSelection stored inside an invormation object.
  static vtkSelection* GetData(vtkInformation* info);
  static vtkSelection* GetData(vtkInformationVector* v, int i=0);

//BTX
protected:
  vtkSelection();
  ~vtkSelection();

private:
  vtkSelection(const vtkSelection&);  // Not implemented.
  void operator=(const vtkSelection&);  // Not implemented.

  vtkSelectionInternals* Internal;
//ETX
};

#endif