VTK
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 
64  void FreeObject(vtkObject* obj);
65 
66 protected:
68  ~vtkObjectIdMap() override;
69 
70 private:
71  vtkObjectIdMap(const vtkObjectIdMap&) = delete;
72  void operator=(const vtkObjectIdMap&) = delete;
73 
74  struct vtkInternals;
75  vtkInternals* Internals;
76 
77 };
78 
79 #endif
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObjectIdMap
class used to assign Id to any VTK object and be able to retrieve it base on its id.
Definition: vtkObjectIdMap.h:30
vtkObject.h