VTK  9.2.6
vtkObjectIdMap.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkObjectIdMap.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 =========================================================================*/
24 #ifndef vtkObjectIdMap_h
25 #define vtkObjectIdMap_h
26 
27 #include "vtkObject.h"
28 #include "vtkWebCoreModule.h" // needed for exports
29 
30 class VTKWEBCORE_EXPORT vtkObjectIdMap : public vtkObject
31 {
32 public:
33  static vtkObjectIdMap* New();
34  vtkTypeMacro(vtkObjectIdMap, vtkObject);
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
41  vtkTypeUInt32 GetGlobalId(vtkObject* obj);
42 
46  vtkObject* GetVTKObject(vtkTypeUInt32 globalId);
47 
54  vtkTypeUInt32 SetActiveObject(const char* objectType, vtkObject* obj);
55 
59  vtkObject* GetActiveObject(const char* objectType);
60 
66  bool FreeObject(vtkObject* obj);
67 
73  bool FreeObjectById(vtkTypeUInt32 id);
74 
75 protected:
77  ~vtkObjectIdMap() override;
78 
79 private:
80  vtkObjectIdMap(const vtkObjectIdMap&) = delete;
81  void operator=(const vtkObjectIdMap&) = delete;
82 
83  struct vtkInternals;
84  vtkInternals* Internals;
85 };
86 
87 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
class used to assign Id to any VTK object and be able to retrieve it base on its id.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...