VTK
vtkInformationObjectBaseKey.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInformationObjectBaseKey.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 =========================================================================*/
26 #ifndef vtkInformationObjectBaseKey_h
27 #define vtkInformationObjectBaseKey_h
28 
29 #include "vtkCommonCoreModule.h" // For export macro
30 #include "vtkInformationKey.h"
31 
32 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
33 
34 class vtkObjectBase;
35 
36 class VTKCOMMONCORE_EXPORT vtkInformationObjectBaseKey : public vtkInformationKey
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  vtkInformationObjectBaseKey(const char* name, const char* location,
43  const char* requiredClass=nullptr);
44  ~vtkInformationObjectBaseKey() override;
45 
52  static vtkInformationObjectBaseKey* MakeKey(const char* name, const char* location,
53  const char* requiredClass=nullptr)
54  {
55  return new vtkInformationObjectBaseKey(name, location, requiredClass);
56  }
57 
59 
63  void Set(vtkInformation* info, vtkObjectBase*);
64  vtkObjectBase* Get(vtkInformation* info);
66 
72  void ShallowCopy(vtkInformation* from, vtkInformation* to) override;
73 
77  void Report(vtkInformation* info, vtkGarbageCollector* collector) override;
78 
79 protected:
80  // The type required of all objects stored with this key.
81  const char* RequiredClass;
82 
83  vtkInformationKeySetStringMacro(RequiredClass);
84 
85 private:
87  void operator=(const vtkInformationObjectBaseKey&) = delete;
88 };
89 
90 #endif
virtual void Report(vtkInformation *info, vtkGarbageCollector *collector)
Report a reference this key has in the given information object.
virtual void ShallowCopy(vtkInformation *from, vtkInformation *to)=0
Copy the entry associated with this key from one information object to another.
Store vtkAlgorithm input/output information.
static vtkInformationObjectBaseKey * MakeKey(const char *name, const char *location, const char *requiredClass=nullptr)
This method simply returns a new vtkInformationObjectBaseKey, given a name, location and optionally a...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Detect and break reference loops.
Superclass for vtkInformation keys.
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for vtkObjectBase values.
abstract base class for most VTK objects
Definition: vtkObjectBase.h:65
vtkInformationKeySetStringMacro(Name)