VTK  9.1.0
vtkHyperTreeCursor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkHyperTreeCursor.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=========================================================================*/
34#ifndef vtkHyperTreeCursor_h
35#define vtkHyperTreeCursor_h
36
37#include "vtkCommonDataModelModule.h" // For export macro
38#include "vtkObject.h"
39
40class vtkHyperTree;
41
42class VTKCOMMONDATAMODEL_EXPORT vtkHyperTreeCursor : public vtkObject
43{
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
51 virtual void SetTree(vtkHyperTree*) = 0;
52
56 virtual vtkHyperTree* GetTree() = 0;
57
61 virtual vtkIdType GetVertexId() = 0;
62
66 virtual bool IsLeaf() = 0;
67
71 virtual bool IsRoot() = 0;
72
77 virtual unsigned int GetLevel() = 0;
78
84 virtual int GetChildIndex() = 0;
85
91 virtual void ToRoot() = 0;
92
97 virtual void ToParent() = 0;
98
104 virtual void ToChild(int child) = 0;
105
112 virtual void ToSameVertex(vtkHyperTreeCursor* other) = 0;
113
119 virtual bool IsEqual(vtkHyperTreeCursor* other) = 0;
120
126 virtual vtkHyperTreeCursor* Clone() = 0;
127
132 virtual int SameTree(vtkHyperTreeCursor* other) = 0;
133
138 virtual int GetNumberOfChildren() = 0;
139
144 virtual int GetDimension() = 0;
145
146protected:
147 // Constructor
150
151private:
152 vtkHyperTreeCursor(const vtkHyperTreeCursor&) = delete;
153 void operator=(const vtkHyperTreeCursor&) = delete;
154};
155#endif
Objects for depth-first traversal HyperTrees.
virtual int SameTree(vtkHyperTreeCursor *other)=0
Are ‘this’ and ‘other’ pointing on the same hypertree?
virtual void ToParent()=0
Move the cursor to the parent of the current vertex.
virtual bool IsRoot()=0
Is the cursor at tree root?
virtual vtkHyperTree * GetTree()=0
Return the HyperTree to which the cursor is pointing.
~vtkHyperTreeCursor() override
virtual vtkHyperTreeCursor * Clone()=0
Create a copy of ‘this’.
virtual void SetTree(vtkHyperTree *)=0
Set the HyperTree to which the cursor is pointing.
virtual void ToChild(int child)=0
Move the cursor to child ‘child’ of the current vertex.
virtual void ToSameVertex(vtkHyperTreeCursor *other)=0
Move the cursor to the same vertex pointed by ‘other’.
virtual int GetChildIndex()=0
Return the child number of the current vertex relative to its parent.
virtual bool IsEqual(vtkHyperTreeCursor *other)=0
Is ‘this’ equal to ‘other’?
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int GetDimension()=0
Return the dimension of the tree.
virtual void ToRoot()=0
Move the cursor to the root vertex.
virtual unsigned int GetLevel()=0
Return the level of the vertex pointed by the cursor.
virtual vtkIdType GetVertexId()=0
Return the index of the current vertex in the tree.
virtual int GetNumberOfChildren()=0
Return the number of children for each node (non-vertex leaf) of the tree.
virtual bool IsLeaf()=0
Is the cursor pointing to a leaf?
A data object structured as a tree.
Definition: vtkHyperTree.h:177
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
int vtkIdType
Definition: vtkType.h:332