VTK  9.0.1
vtkInformation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInformation.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 =========================================================================*/
28 #ifndef vtkInformation_h
29 #define vtkInformation_h
30 
31 #include "vtkCommonCoreModule.h" // For export macro
32 #include "vtkObject.h"
33 
34 #include <string> // for std::string compat
35 
36 class vtkDataObject;
37 class vtkExecutive;
50 class vtkInformationKey;
51 class vtkInformationKeyToInformationFriendship;
62 class vtkVariant;
63 
64 class VTKCOMMONCORE_EXPORT vtkInformation : public vtkObject
65 {
66 public:
67  static vtkInformation* New();
68  vtkTypeMacro(vtkInformation, vtkObject);
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70  void PrintKeys(ostream& os, vtkIndent indent);
71 
76  void Modified() override;
77 
84 
88  void Clear();
89 
95 
103  void Copy(vtkInformation* from, int deep = 0);
104 
111  void Append(vtkInformation* from, int deep = 0);
112 
114 
120  void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep = 0);
135 
143 
148 
153 
155 
162 
164 
172 
174 
182 
184 
192 
194 
202 
204 
209  void Set(vtkInformationIntegerVectorKey* key, int value1, int value2, int value3);
210  void Set(vtkInformationIntegerVectorKey* key, int value1, int value2, int value3, int value4,
211  int value5, int value6);
219 
221 
225  void Set(vtkInformationStringVectorKey* key, const char* value, int idx = 0);
228  const char* Get(vtkInformationStringVectorKey* key, int idx = 0);
233 
235 
245 
247 
255 
257 
261  void Set(vtkInformationDoubleVectorKey* key, const double* value, int length);
262  void Set(vtkInformationDoubleVectorKey* key, double value1, double value2, double value3);
263  void Set(vtkInformationDoubleVectorKey* key, double value1, double value2, double value3,
264  double value4, double value5, double value6);
272 
274 
279  void Set(vtkInformationVariantVectorKey* key, const vtkVariant& value1, const vtkVariant& value2,
280  const vtkVariant& value3);
281  void Set(vtkInformationVariantVectorKey* key, const vtkVariant& value1, const vtkVariant& value2,
282  const vtkVariant& value3, const vtkVariant& value4, const vtkVariant& value5,
283  const vtkVariant& value6);
291 
293 
307 
308  // Provide extra overloads of this method to avoid requiring user
309  // code to include the headers for these key types. Avoid wrapping
310  // them because the original method can be called from the wrappers
311  // anyway and this causes a python help string to be too long.
312 
324 
336 
338 
341  void Set(vtkInformationStringKey* key, const char*);
347 
349 
357 
359 
367 
369 
377 
379 
388  void Remove(vtkInformationObjectBaseVectorKey* key, int indexToRemove);
391 
393 
401 
403 
421 
423 
426  void Register(vtkObjectBase* o) override;
427  void UnRegister(vtkObjectBase* o) override;
429 
431 
437 
438 protected:
440  ~vtkInformation() override;
441 
442  // Get/Set a map entry directly through the vtkObjectBase instance
443  // representing the value. Used internally to manage the map.
447 
448  // Internal implementation details.
450 
451  // Garbage collection support.
453 
454  // Report the object associated with the given key to the collector.
456 
457 private:
458  friend class vtkInformationKeyToInformationFriendship;
460 
461 private:
462  vtkInformation(const vtkInformation&) = delete;
463  void operator=(const vtkInformation&) = delete;
464  vtkInformationRequestKey* Request;
465 };
466 
467 #endif
468 // VTK-HeaderTest-Exclude: vtkInformation.h
general representation of visualization data
Definition: vtkDataObject.h:60
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:47
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:34
Key for vtkDataObject values.
Key for double values in vtkInformation.
Key for vtkExecutive/Port value pairs.
Key for vtkExecutive/Port value pair vectors.
Key for vtkIdType values in vtkInformation.
Key for vtkInformation values.
Key for integer values in vtkInformation.
internal structure for vtkInformation
Iterates over keys of an information object.
Key for vector-of-keys values.
Superclass for vtkInformation keys.
Key for vtkObjectBase values.
Key for vtkObjectBase vector values.
Key for pointer to pointer.
Key for string values in vtkInformation.
Key for unsigned long values in vtkInformation.
Key for variant values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
void Remove(vtkInformationObjectBaseKey *key)
void CopyEntry(vtkInformation *from, vtkInformationIntegerKey *key, int deep=0)
void CopyEntry(vtkInformation *from, vtkInformationIntegerVectorKey *key, int deep=0)
int Has(vtkInformationVariantKey *key)
static vtkInformationKey * GetKey(vtkInformationInformationKey *key)
void Get(vtkInformationDoubleVectorKey *key, double *value)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationKey *value)
void Set(vtkInformationInformationVectorKey *key, vtkInformationVector *)
Get/Set an entry storing a vtkInformationVector instance.
void Append(vtkInformationStringVectorKey *key, const char *value)
Get/Set a string-vector-valued entry.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationStringKey *value)
void Append(vtkInformationKeyVectorKey *key, vtkInformationDoubleVectorKey *value)
void Remove(vtkInformationUnsignedLongKey *key)
void Set(vtkInformationIntegerVectorKey *key, int value1, int value2, int value3)
void Set(vtkInformationDoubleVectorKey *key, double value1, double value2, double value3)
int Get(vtkInformationIntegerKey *key)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationDoubleKey *value)
void Append(vtkInformationKeyVectorKey *key, vtkInformationObjectBaseKey *value)
int Has(vtkInformationObjectBaseKey *key)
void Get(vtkInformationIntegerVectorKey *key, int *value)
vtkDataObject VTK_WRAP_EXTERN * Get(vtkInformationDataObjectKey *key)
void Copy(vtkInformation *from, int deep=0)
Copy all information entries from the given vtkInformation instance.
void Remove(vtkInformationDoubleVectorKey *key)
void CopyEntry(vtkInformation *from, vtkInformationKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
static vtkInformationKey * GetKey(vtkInformationDoubleVectorKey *key)
void Set(vtkInformationVariantVectorKey *key, const vtkVariant &value1, const vtkVariant &value2, const vtkVariant &value3, const vtkVariant &value4, const vtkVariant &value5, const vtkVariant &value6)
void Set(vtkInformationKeyVectorKey *key, vtkInformationKey *const *value, int length)
void Set(vtkInformationIntegerVectorKey *key, int value1, int value2, int value3, int value4, int value5, int value6)
double * Get(vtkInformationDoubleVectorKey *key)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationObjectBaseKey *value)
void Set(vtkInformationIntegerPointerKey *key, int *value, int length)
Get/Set an integer-pointer-valued entry.
const vtkVariant & Get(vtkInformationVariantVectorKey *key, int idx)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationStringVectorKey *value)
vtkInformationVector * Get(vtkInformationInformationVectorKey *key)
void Set(vtkInformationIntegerVectorKey *key, const int *value, int length)
static vtkInformationKey * GetKey(vtkInformationIntegerKey *key)
void Set(vtkInformationObjectBaseVectorKey *key, vtkObjectBase *value, int idx=0)
int Has(vtkInformationDoubleKey *key)
void Append(vtkInformation *from, int deep=0)
Append all information entries from the given vtkInformation instance.
void Remove(vtkInformationKey *key)
Remove the given key and its data from this information object.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationIntegerVectorKey *value)
void ReportAsObjectBase(vtkInformationKey *key, vtkGarbageCollector *collector)
void Set(vtkInformationInformationKey *key, vtkInformation *)
Get/Set an entry storing another vtkInformation instance.
double Get(vtkInformationDoubleKey *key)
void UnRegister(vtkObjectBase *o) override
Decrease the reference count (release by another object).
void Remove(vtkInformationVariantVectorKey *key)
int Has(vtkInformationInformationVectorKey *key)
static vtkInformationKey * GetKey(vtkInformationDataObjectKey *key)
Upcast the given key instance.
int Length(vtkInformationVariantVectorKey *key)
void Append(vtkInformationDoubleVectorKey *key, double value)
Get/Set an double-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationVariantVectorKey *key)
void SetRequest(vtkInformationRequestKey *request)
Get/Set the Request ivar.
void CopyEntry(vtkInformation *from, vtkInformationDataObjectKey *key, int deep=0)
void Set(vtkInformationObjectBaseKey *key, vtkObjectBase *)
Get/Set an entry storing a vtkObjectBase instance.
void CopyEntry(vtkInformation *from, vtkInformationInformationKey *key, int deep=0)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationUnsignedLongKey *value)
void Modified() override
Modified signature with no arguments that calls Modified on vtkObject superclass.
vtkObjectBase * GetAsObjectBase(vtkInformationKey *key)
const vtkVariant * Get(vtkInformationVariantVectorKey *key)
static vtkInformationKey * GetKey(vtkInformationUnsignedLongKey *key)
void Append(vtkInformationKeyVectorKey *key, vtkInformationInformationVectorKey *value)
static vtkInformationKey * GetKey(vtkInformationStringKey *key)
int Length(vtkInformationKeyVectorKey *key)
void CopyEntry(vtkInformation *from, vtkInformationStringVectorKey *key, int deep=0)
void Set(vtkInformationDoubleKey *key, double value)
Get/Set an double-valued entry.
void Append(vtkInformationKeyVectorKey *key, vtkInformationIntegerVectorKey *value)
int Length(vtkInformationDoubleVectorKey *key)
static vtkInformationKey * GetKey(vtkInformationIntegerVectorKey *key)
void CopyEntry(vtkInformation *from, vtkInformationVariantKey *key, int deep=0)
vtkInformation * Get(vtkInformationInformationKey *key)
void CopyEntry(vtkInformation *from, vtkInformationDoubleVectorKey *key, int deep=0)
const vtkObjectBase * GetAsObjectBase(const vtkInformationKey *key) const
void Set(vtkInformationStringKey *key, const char *)
Get/Set a string-valued entry.
static vtkInformationKey * GetKey(vtkInformationVariantKey *key)
void Get(vtkInformationKeyVectorKey *key, vtkInformationKey **value)
int Has(vtkInformationDataObjectKey *key)
void Get(vtkInformationIntegerPointerKey *key, int *value)
void Set(vtkInformationVariantKey *key, const vtkVariant &value)
Get/Set an variant-valued entry.
~vtkInformation() override
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationDoubleVectorKey *value)
void Set(vtkInformationVariantVectorKey *key, const vtkVariant *value, int length)
void Remove(vtkInformationStringKey *key)
const char * Get(vtkInformationStringVectorKey *key, int idx=0)
void Append(vtkInformationKeyVectorKey *key, vtkInformationInformationKey *value)
vtkInformationRequestKey * GetRequest()
void Append(vtkInformationKeyVectorKey *key, vtkInformationKey *value)
Get/Set an InformationKey-vector-valued entry.
vtkInformationKey * Get(vtkInformationKeyVectorKey *key, int idx)
void Remove(vtkInformationKeyVectorKey *key)
void Remove(vtkInformationObjectBaseVectorKey *key, int indexToRemove)
void Remove(vtkInformationInformationKey *key)
void ReportReferences(vtkGarbageCollector *) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Remove(vtkInformationObjectBaseVectorKey *key)
void Clear()
Clear all information entries.
int Has(vtkInformationUnsignedLongKey *key)
int Has(vtkInformationIdTypeKey *key)
void Append(vtkInformationKeyVectorKey *key, vtkInformationUnsignedLongKey *value)
int Has(vtkInformationStringVectorKey *key)
void Set(vtkInformationDoubleVectorKey *key, double value1, double value2, double value3, double value4, double value5, double value6)
vtkIdType Get(vtkInformationIdTypeKey *key)
void CopyEntry(vtkInformation *from, vtkInformationVariantVectorKey *key, int deep=0)
static vtkInformationKey * GetKey(vtkInformationRequestKey *key)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationInformationVectorKey *value)
const char * Get(vtkInformationStringKey *key)
void Remove(vtkInformationIntegerPointerKey *key)
int Has(vtkInformationVariantVectorKey *key)
void Remove(vtkInformationVariantKey *key)
void CopyEntries(vtkInformation *from, vtkInformationKeyVectorKey *key, int deep=0)
Use the given key to lookup a list of other keys in the given information object.
void Append(vtkInformationIntegerVectorKey *key, int value)
Get/Set an integer-vector-valued entry.
void Append(vtkInformationStringVectorKey *key, const std::string &value)
vtkObjectBase * Get(vtkInformationObjectBaseVectorKey *key, int idx=0)
void Remove(vtkInformationIntegerVectorKey *key)
void Set(vtkInformationDoubleVectorKey *key, const double *value, int length)
void Set(vtkInformationStringVectorKey *key, const std::string &value, int idx=0)
void Remove(vtkInformationDoubleKey *key)
int GetNumberOfKeys()
Return the number of keys in this information object (as would be returned by iterating over the keys...
vtkInformationKey ** Get(vtkInformationKeyVectorKey *key)
void Remove(vtkInformationInformationVectorKey *key)
void Modified(vtkInformationKey *key)
Modified signature that takes an information key as an argument.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationDataObjectKey *value)
int Has(vtkInformationIntegerPointerKey *key)
void Append(vtkInformationKeyVectorKey *key, vtkInformationStringKey *value)
void Append(vtkInformationKeyVectorKey *key, vtkInformationDataObjectKey *value)
void Register(vtkObjectBase *o) override
Initiate garbage collection when a reference is removed.
vtkInformationInternals * Internal
void SetAsObjectBase(vtkInformationKey *key, vtkObjectBase *value)
void Append(vtkInformationObjectBaseVectorKey *key, vtkObjectBase *data)
Manipulate a ObjectBaseVector entry.
int * Get(vtkInformationIntegerPointerKey *key)
int Has(vtkInformationRequestKey *key)
void Set(vtkInformationUnsignedLongKey *key, unsigned long value)
Get/Set an unsigned-long-valued entry.
void Set(vtkInformationRequestKey *key)
Get/Set a request-valued entry.
void Append(vtkInformationKeyVectorKey *key, vtkInformationDoubleKey *value)
void Get(vtkInformationVariantVectorKey *key, vtkVariant *value)
static vtkInformationKey * GetKey(vtkInformationDoubleKey *key)
void Append(vtkInformationKeyVectorKey *key, vtkInformationStringVectorKey *value)
int Length(vtkInformationIntegerVectorKey *key)
int Has(vtkInformationIntegerKey *key)
int * Get(vtkInformationIntegerVectorKey *key)
int Has(vtkInformationInformationKey *key)
unsigned long Get(vtkInformationUnsignedLongKey *key)
void Append(vtkInformationKeyVectorKey *key, vtkInformationIntegerKey *value)
int Has(vtkInformationIntegerVectorKey *key)
void Set(vtkInformationVariantVectorKey *key, const vtkVariant &value1, const vtkVariant &value2, const vtkVariant &value3)
int Has(vtkInformationDoubleVectorKey *key)
int Get(vtkInformationIntegerVectorKey *key, int idx)
int Length(vtkInformationIntegerPointerKey *key)
void CopyEntry(vtkInformation *from, vtkInformationRequestKey *key, int deep=0)
void Remove(vtkInformationStringVectorKey *key)
void Remove(vtkInformationDataObjectKey *key)
static vtkInformationKey * GetKey(vtkInformationInformationVectorKey *key)
double Get(vtkInformationDoubleVectorKey *key, int idx)
void Remove(vtkInformationKeyVectorKey *key, vtkInformationKey *value)
void Set(vtkInformationStringVectorKey *key, const char *value, int idx=0)
int Length(vtkInformationStringVectorKey *key)
int Has(vtkInformationKeyVectorKey *key)
void CopyEntry(vtkInformation *from, vtkInformationUnsignedLongKey *key, int deep=0)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationIntegerKey *value)
void CopyEntry(vtkInformation *from, vtkInformationInformationVectorKey *key, int deep=0)
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationInformationKey *value)
void CopyEntry(vtkInformation *from, vtkInformationObjectBaseVectorKey *key, int deep=0)
vtkObjectBase * Get(vtkInformationObjectBaseKey *key)
void Remove(vtkInformationObjectBaseVectorKey *key, vtkObjectBase *objectToRemove)
static vtkInformation * New()
void Set(vtkInformationDataObjectKey *key, vtkDataObject VTK_WRAP_EXTERN *)
Get/Set an entry storing a vtkDataObject instance.
const vtkVariant & Get(vtkInformationVariantKey *key)
int Has(vtkInformationObjectBaseVectorKey *key)
int Has(vtkInformationStringKey *key)
void Append(vtkInformationVariantVectorKey *key, const vtkVariant &value)
Get/Set an variant-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationStringVectorKey *key)
void Set(vtkInformationIntegerKey *key, int value)
Get/Set an integer-valued entry.
void Remove(vtkInformationRequestKey *key)
void Remove(vtkInformationIntegerKey *key)
int Length(vtkInformationObjectBaseVectorKey *key)
void Remove(vtkInformationIdTypeKey *key)
void PrintKeys(ostream &os, vtkIndent indent)
void CopyEntry(vtkInformation *from, vtkInformationStringKey *key, int deep=0)
void Set(vtkInformationStringKey *key, const std::string &)
int Has(vtkInformationKey *key)
Check whether the given key appears in this information object.
static vtkInformationKey * GetKey(vtkInformationKey *key)
void Set(vtkInformationIdTypeKey *key, vtkIdType value)
Get/Set a vtkIdType-valued entry.
abstract base class for most VTK objects
Definition: vtkObjectBase.h:64
abstract base class for most VTK objects
Definition: vtkObject.h:54
A atomic type representing the union of many types.
Definition: vtkVariant.h:66
@ key
Definition: vtkX3D.h:263
@ length
Definition: vtkX3D.h:399
@ value
Definition: vtkX3D.h:226
@ data
Definition: vtkX3D.h:321
@ string
Definition: vtkX3D.h:496
int vtkIdType
Definition: vtkType.h:338