VTK  9.7.20260926
vtkAssemblyPaths.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
14
15#ifndef vtkAssemblyPaths_h
16#define vtkAssemblyPaths_h
17
18#include "vtkCollection.h"
19#include "vtkRenderingCoreModule.h" // For export macro
20#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21
22#include "vtkAssemblyPath.h" // Needed for inline methods
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkProp;
26
27class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkAssemblyPaths : public vtkCollection
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
37 void AddItem(vtkAssemblyPath* p);
38
43
50
55
61
67 {
68 return static_cast<vtkAssemblyPath*>(this->GetNextItemAsObject(cookie));
69 }
70
71protected:
72 vtkAssemblyPaths() = default;
73 ~vtkAssemblyPaths() override = default;
74
75private:
76 // hide the standard AddItem from the user and the compiler.
77 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
79 void RemoveItem(int i) { this->vtkCollection::RemoveItem(i); }
80 int IsItemPresent(vtkObject* o) { return this->vtkCollection::IsItemPresent(o); }
81
82 vtkAssemblyPaths(const vtkAssemblyPaths&) = delete;
83 void operator=(const vtkAssemblyPaths&) = delete;
84};
85
90
95
100
102{
103 return static_cast<vtkAssemblyPath*>(this->GetNextItemAsObject());
104}
105
106VTK_ABI_NAMESPACE_END
107#endif
a list of nodes that form an assembly path
void AddItem(vtkAssemblyPath *p)
Add a path to the list.
int IsItemPresent(vtkAssemblyPath *p)
Determine whether a particular path is present.
static vtkAssemblyPaths * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAssemblyPath * GetNextItem()
Get the next path in the list.
vtkAssemblyPaths()=default
vtkMTimeType GetMTime() override
Override the standard GetMTime() to check for the modified times of the paths.
~vtkAssemblyPaths() override=default
void RemoveItem(vtkAssemblyPath *p)
Remove a path from the list.
vtkAssemblyPath * GetNextPath(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void RemoveItem(int i)
Remove the i'th item in the collection.
vtkCollection()=default
int IsItemPresent(vtkObject *a) VTK_FUTURE_CONST
Search for the given item and return the 1-based index of its first occurrence in the collection.
void AddItem(vtkObject *)
Add given item to the bottom (end) of the collection.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:68
void * vtkCollectionSimpleIterator
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_MARSHALAUTO