VTK  9.2.20230603
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 =========================================================================*/
146 #ifndef vtkInformation_h
147 #define vtkInformation_h
148 
149 #include "vtkCommonCoreModule.h" // For export macro
150 #include "vtkObject.h"
151 
152 #include <string> // for std::string compat
153 
154 VTK_ABI_NAMESPACE_BEGIN
155 class vtkDataObject;
156 class vtkExecutive;
169 class vtkInformationKey;
170 class vtkInformationKeyToInformationFriendship;
181 class vtkVariant;
182 
183 class VTKCOMMONCORE_EXPORT vtkInformation : public vtkObject
184 {
185 public:
186  static vtkInformation* New();
187  vtkTypeMacro(vtkInformation, vtkObject);
188  void PrintSelf(ostream& os, vtkIndent indent) override;
189  void PrintKeys(ostream& os, vtkIndent indent);
190 
195  void Modified() override;
196 
203 
207  void Clear();
208 
214 
222  void Copy(vtkInformation* from, int deep = 0);
223 
230  void Append(vtkInformation* from, int deep = 0);
231 
233 
239  void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep = 0);
254 
262 
267 
272 
274 
281 
283 
291 
293 
301 
303 
311 
313 
321 
323 
328  void Set(vtkInformationIntegerVectorKey* key, int value1, int value2, int value3);
329  void Set(vtkInformationIntegerVectorKey* key, int value1, int value2, int value3, int value4,
330  int value5, int value6);
338 
340 
344  void Set(vtkInformationStringVectorKey* key, const char* value, int idx = 0);
347  const char* Get(vtkInformationStringVectorKey* key, int idx = 0);
352 
354 
364 
366 
374 
376 
380  void Set(vtkInformationDoubleVectorKey* key, const double* value, int length);
381  void Set(vtkInformationDoubleVectorKey* key, double value1, double value2, double value3);
382  void Set(vtkInformationDoubleVectorKey* key, double value1, double value2, double value3,
383  double value4, double value5, double value6);
391 
393 
398  void Set(vtkInformationVariantVectorKey* key, const vtkVariant& value1, const vtkVariant& value2,
399  const vtkVariant& value3);
400  void Set(vtkInformationVariantVectorKey* key, const vtkVariant& value1, const vtkVariant& value2,
401  const vtkVariant& value3, const vtkVariant& value4, const vtkVariant& value5,
402  const vtkVariant& value6);
410 
412 
426 
427  // Provide extra overloads of this method to avoid requiring user
428  // code to include the headers for these key types. Avoid wrapping
429  // them because the original method can be called from the wrappers
430  // anyway and this causes a python help string to be too long.
431 
443 
455 
457 
460  void Set(vtkInformationStringKey* key, const char*);
466 
468 
476 
478 
486 
488 
496 
498 
507  void Remove(vtkInformationObjectBaseVectorKey* key, int indexToRemove);
510 
512 
520 
522 
540 
542 
545  bool UsesGarbageCollector() const override { return true; }
547 
549 
555 
556 protected:
558  ~vtkInformation() override;
559 
560  // Get/Set a map entry directly through the vtkObjectBase instance
561  // representing the value. Used internally to manage the map.
565 
566  // Internal implementation details.
568 
569  // Garbage collection support.
571 
572  // Report the object associated with the given key to the collector.
574 
575 private:
576  friend class vtkInformationKeyToInformationFriendship;
578 
579  vtkInformation(const vtkInformation&) = delete;
580  void operator=(const vtkInformation&) = delete;
581  vtkInformationRequestKey* Request;
582 };
583 
584 VTK_ABI_NAMESPACE_END
585 #endif
general representation of visualization data
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:80
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:120
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)
Get/Set an entry storing a vtkObjectBase instance.
void CopyEntry(vtkInformation *from, vtkInformationIntegerKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
void CopyEntry(vtkInformation *from, vtkInformationIntegerVectorKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
int Has(vtkInformationVariantKey *key)
Get/Set an variant-valued entry.
static vtkInformationKey * GetKey(vtkInformationInformationKey *key)
Upcast the given key instance.
void Get(vtkInformationDoubleVectorKey *key, double *value)
Get/Set an double-vector-valued entry.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationKey *value)
Get/Set an InformationKey-vector-valued entry.
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)
Get/Set an unsigned-long-valued entry.
void Set(vtkInformationIntegerVectorKey *key, int value1, int value2, int value3)
Get/Set an integer-vector-valued entry.
void Set(vtkInformationDoubleVectorKey *key, double value1, double value2, double value3)
Get/Set an double-vector-valued entry.
int Get(vtkInformationIntegerKey *key)
Get/Set an integer-valued entry.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationDoubleKey *value)
void Append(vtkInformationKeyVectorKey *key, vtkInformationObjectBaseKey *value)
int Has(vtkInformationObjectBaseKey *key)
Get/Set an entry storing a vtkObjectBase instance.
void Get(vtkInformationIntegerVectorKey *key, int *value)
Get/Set an integer-vector-valued entry.
vtkDataObject VTK_WRAP_EXTERN * Get(vtkInformationDataObjectKey *key)
Get/Set an entry storing a vtkDataObject instance.
void Copy(vtkInformation *from, int deep=0)
Copy all information entries from the given vtkInformation instance.
void Remove(vtkInformationDoubleVectorKey *key)
Get/Set an double-vector-valued entry.
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)
Upcast the given key instance.
void Set(vtkInformationVariantVectorKey *key, const vtkVariant &value1, const vtkVariant &value2, const vtkVariant &value3, const vtkVariant &value4, const vtkVariant &value5, const vtkVariant &value6)
Get/Set an variant-vector-valued entry.
void Set(vtkInformationKeyVectorKey *key, vtkInformationKey *const *value, int length)
Get/Set an InformationKey-vector-valued entry.
void Set(vtkInformationIntegerVectorKey *key, int value1, int value2, int value3, int value4, int value5, int value6)
Get/Set an integer-vector-valued entry.
double * Get(vtkInformationDoubleVectorKey *key)
Get/Set an double-vector-valued entry.
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)
Get/Set an variant-vector-valued entry.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationStringVectorKey *value)
vtkInformationVector * Get(vtkInformationInformationVectorKey *key)
Get/Set an entry storing a vtkInformationVector instance.
void Set(vtkInformationIntegerVectorKey *key, const int *value, int length)
Get/Set an integer-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationIntegerKey *key)
Upcast the given key instance.
void Set(vtkInformationObjectBaseVectorKey *key, vtkObjectBase *value, int idx=0)
Manipulate a ObjectBaseVector entry.
int Has(vtkInformationDoubleKey *key)
Get/Set an double-valued entry.
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)
Get/Set an double-valued entry.
void Remove(vtkInformationVariantVectorKey *key)
Get/Set an variant-vector-valued entry.
int Has(vtkInformationInformationVectorKey *key)
Get/Set an entry storing a vtkInformationVector instance.
static vtkInformationKey * GetKey(vtkInformationDataObjectKey *key)
Upcast the given key instance.
int Length(vtkInformationVariantVectorKey *key)
Get/Set an variant-vector-valued entry.
void Append(vtkInformationDoubleVectorKey *key, double value)
Get/Set an double-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationVariantVectorKey *key)
Upcast the given key instance.
void SetRequest(vtkInformationRequestKey *request)
Get/Set the Request ivar.
void CopyEntry(vtkInformation *from, vtkInformationDataObjectKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
void Set(vtkInformationObjectBaseKey *key, vtkObjectBase *)
Get/Set an entry storing a vtkObjectBase instance.
void CopyEntry(vtkInformation *from, vtkInformationInformationKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
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)
Get/Set an variant-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationUnsignedLongKey *key)
Upcast the given key instance.
void Append(vtkInformationKeyVectorKey *key, vtkInformationInformationVectorKey *value)
static vtkInformationKey * GetKey(vtkInformationStringKey *key)
Upcast the given key instance.
int Length(vtkInformationKeyVectorKey *key)
Get/Set an InformationKey-vector-valued entry.
void CopyEntry(vtkInformation *from, vtkInformationStringVectorKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
void Set(vtkInformationDoubleKey *key, double value)
Get/Set an double-valued entry.
void Append(vtkInformationKeyVectorKey *key, vtkInformationIntegerVectorKey *value)
int Length(vtkInformationDoubleVectorKey *key)
Get/Set an double-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationIntegerVectorKey *key)
Upcast the given key instance.
void CopyEntry(vtkInformation *from, vtkInformationVariantKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
vtkInformation * Get(vtkInformationInformationKey *key)
Get/Set an entry storing another vtkInformation instance.
void CopyEntry(vtkInformation *from, vtkInformationDoubleVectorKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
const vtkObjectBase * GetAsObjectBase(const vtkInformationKey *key) const
void Set(vtkInformationStringKey *key, const char *)
Get/Set a string-valued entry.
static vtkInformationKey * GetKey(vtkInformationVariantKey *key)
Upcast the given key instance.
void Get(vtkInformationKeyVectorKey *key, vtkInformationKey **value)
Get/Set an InformationKey-vector-valued entry.
int Has(vtkInformationDataObjectKey *key)
Get/Set an entry storing a vtkDataObject instance.
void Get(vtkInformationIntegerPointerKey *key, int *value)
Get/Set an integer-pointer-valued entry.
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)
Get/Set an variant-vector-valued entry.
void Remove(vtkInformationStringKey *key)
Get/Set a string-valued entry.
const char * Get(vtkInformationStringVectorKey *key, int idx=0)
Get/Set a string-vector-valued entry.
void Append(vtkInformationKeyVectorKey *key, vtkInformationInformationKey *value)
vtkInformationRequestKey * GetRequest()
Get/Set the Request ivar.
void Append(vtkInformationKeyVectorKey *key, vtkInformationKey *value)
Get/Set an InformationKey-vector-valued entry.
vtkInformationKey * Get(vtkInformationKeyVectorKey *key, int idx)
Get/Set an InformationKey-vector-valued entry.
void Remove(vtkInformationKeyVectorKey *key)
Get/Set an InformationKey-vector-valued entry.
void Remove(vtkInformationObjectBaseVectorKey *key, int indexToRemove)
Manipulate a ObjectBaseVector entry.
void Remove(vtkInformationInformationKey *key)
Get/Set an entry storing another vtkInformation instance.
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)
Manipulate a ObjectBaseVector entry.
void Clear()
Clear all information entries.
int Has(vtkInformationUnsignedLongKey *key)
Get/Set an unsigned-long-valued entry.
int Has(vtkInformationIdTypeKey *key)
Get/Set a vtkIdType-valued entry.
void Append(vtkInformationKeyVectorKey *key, vtkInformationUnsignedLongKey *value)
int Has(vtkInformationStringVectorKey *key)
Get/Set a string-vector-valued entry.
void Set(vtkInformationDoubleVectorKey *key, double value1, double value2, double value3, double value4, double value5, double value6)
Get/Set an double-vector-valued entry.
vtkIdType Get(vtkInformationIdTypeKey *key)
Get/Set a vtkIdType-valued entry.
void CopyEntry(vtkInformation *from, vtkInformationVariantVectorKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
static vtkInformationKey * GetKey(vtkInformationRequestKey *key)
Upcast the given key instance.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationInformationVectorKey *value)
const char * Get(vtkInformationStringKey *key)
Get/Set a string-valued entry.
void Remove(vtkInformationIntegerPointerKey *key)
Get/Set an integer-pointer-valued entry.
int Has(vtkInformationVariantVectorKey *key)
Get/Set an variant-vector-valued entry.
void Remove(vtkInformationVariantKey *key)
Get/Set an variant-valued entry.
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)
Get/Set a string-vector-valued entry.
vtkObjectBase * Get(vtkInformationObjectBaseVectorKey *key, int idx=0)
Manipulate a ObjectBaseVector entry.
void Remove(vtkInformationIntegerVectorKey *key)
Get/Set an integer-vector-valued entry.
void Set(vtkInformationDoubleVectorKey *key, const double *value, int length)
Get/Set an double-vector-valued entry.
void Set(vtkInformationStringVectorKey *key, const std::string &value, int idx=0)
Get/Set a string-vector-valued entry.
void Remove(vtkInformationDoubleKey *key)
Get/Set an double-valued entry.
int GetNumberOfKeys()
Return the number of keys in this information object (as would be returned by iterating over the keys...
vtkInformationKey ** Get(vtkInformationKeyVectorKey *key)
Get/Set an InformationKey-vector-valued entry.
void Remove(vtkInformationInformationVectorKey *key)
Get/Set an entry storing a vtkInformationVector instance.
void Modified(vtkInformationKey *key)
Modified signature that takes an information key as an argument.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationDataObjectKey *value)
int Has(vtkInformationIntegerPointerKey *key)
Get/Set an integer-pointer-valued entry.
void Append(vtkInformationKeyVectorKey *key, vtkInformationStringKey *value)
void Append(vtkInformationKeyVectorKey *key, vtkInformationDataObjectKey *value)
vtkInformationInternals * Internal
void SetAsObjectBase(vtkInformationKey *key, vtkObjectBase *value)
void Append(vtkInformationObjectBaseVectorKey *key, vtkObjectBase *data)
Manipulate a ObjectBaseVector entry.
int * Get(vtkInformationIntegerPointerKey *key)
Get/Set an integer-pointer-valued entry.
bool UsesGarbageCollector() const override
Initiate garbage collection when a reference is removed.
int Has(vtkInformationRequestKey *key)
Get/Set a request-valued entry.
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)
Get/Set an variant-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationDoubleKey *key)
Upcast the given key instance.
void Append(vtkInformationKeyVectorKey *key, vtkInformationStringVectorKey *value)
int Length(vtkInformationIntegerVectorKey *key)
Get/Set an integer-vector-valued entry.
int Has(vtkInformationIntegerKey *key)
Get/Set an integer-valued entry.
int * Get(vtkInformationIntegerVectorKey *key)
Get/Set an integer-vector-valued entry.
int Has(vtkInformationInformationKey *key)
Get/Set an entry storing another vtkInformation instance.
unsigned long Get(vtkInformationUnsignedLongKey *key)
Get/Set an unsigned-long-valued entry.
void Append(vtkInformationKeyVectorKey *key, vtkInformationIntegerKey *value)
int Has(vtkInformationIntegerVectorKey *key)
Get/Set an integer-vector-valued entry.
void Set(vtkInformationVariantVectorKey *key, const vtkVariant &value1, const vtkVariant &value2, const vtkVariant &value3)
Get/Set an variant-vector-valued entry.
int Has(vtkInformationDoubleVectorKey *key)
Get/Set an double-vector-valued entry.
int Get(vtkInformationIntegerVectorKey *key, int idx)
Get/Set an integer-vector-valued entry.
int Length(vtkInformationIntegerPointerKey *key)
Get/Set an integer-pointer-valued entry.
void CopyEntry(vtkInformation *from, vtkInformationRequestKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
void Remove(vtkInformationStringVectorKey *key)
Get/Set a string-vector-valued entry.
void Remove(vtkInformationDataObjectKey *key)
Get/Set an entry storing a vtkDataObject instance.
static vtkInformationKey * GetKey(vtkInformationInformationVectorKey *key)
Upcast the given key instance.
double Get(vtkInformationDoubleVectorKey *key, int idx)
Get/Set an double-vector-valued entry.
void Remove(vtkInformationKeyVectorKey *key, vtkInformationKey *value)
Get/Set an InformationKey-vector-valued entry.
void Set(vtkInformationStringVectorKey *key, const char *value, int idx=0)
Get/Set a string-vector-valued entry.
int Length(vtkInformationStringVectorKey *key)
Get/Set a string-vector-valued entry.
int Has(vtkInformationKeyVectorKey *key)
Get/Set an InformationKey-vector-valued entry.
void CopyEntry(vtkInformation *from, vtkInformationUnsignedLongKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationIntegerKey *value)
void CopyEntry(vtkInformation *from, vtkInformationInformationVectorKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
void AppendUnique(vtkInformationKeyVectorKey *key, vtkInformationInformationKey *value)
void CopyEntry(vtkInformation *from, vtkInformationObjectBaseVectorKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
vtkObjectBase * Get(vtkInformationObjectBaseKey *key)
Get/Set an entry storing a vtkObjectBase instance.
void Remove(vtkInformationObjectBaseVectorKey *key, vtkObjectBase *objectToRemove)
Manipulate a ObjectBaseVector entry.
static vtkInformation * New()
void Set(vtkInformationDataObjectKey *key, vtkDataObject VTK_WRAP_EXTERN *)
Get/Set an entry storing a vtkDataObject instance.
const vtkVariant & Get(vtkInformationVariantKey *key)
Get/Set an variant-valued entry.
int Has(vtkInformationObjectBaseVectorKey *key)
Manipulate a ObjectBaseVector entry.
int Has(vtkInformationStringKey *key)
Get/Set a string-valued entry.
void Append(vtkInformationVariantVectorKey *key, const vtkVariant &value)
Get/Set an variant-vector-valued entry.
static vtkInformationKey * GetKey(vtkInformationStringVectorKey *key)
Upcast the given key instance.
void Set(vtkInformationIntegerKey *key, int value)
Get/Set an integer-valued entry.
void Remove(vtkInformationRequestKey *key)
Get/Set a request-valued entry.
void Remove(vtkInformationIntegerKey *key)
Get/Set an integer-valued entry.
int Length(vtkInformationObjectBaseVectorKey *key)
Manipulate a ObjectBaseVector entry.
void Remove(vtkInformationIdTypeKey *key)
Get/Set a vtkIdType-valued entry.
void PrintKeys(ostream &os, vtkIndent indent)
void CopyEntry(vtkInformation *from, vtkInformationStringKey *key, int deep=0)
Copy the key/value pair associated with the given key in the given information object.
void Set(vtkInformationStringKey *key, const std::string &)
Get/Set a string-valued entry.
int Has(vtkInformationKey *key)
Check whether the given key appears in this information object.
static vtkInformationKey * GetKey(vtkInformationKey *key)
Upcast the given key instance.
void Set(vtkInformationIdTypeKey *key, vtkIdType value)
Get/Set a vtkIdType-valued entry.
abstract base class for most VTK objects
Definition: vtkObjectBase.h:75
abstract base class for most VTK objects
Definition: vtkObject.h:83
A atomic type representing the union of many types.
Definition: vtkVariant.h:150
@ key
Definition: vtkX3D.h:269
@ length
Definition: vtkX3D.h:405
@ value
Definition: vtkX3D.h:232
@ data
Definition: vtkX3D.h:327
@ string
Definition: vtkX3D.h:502
int vtkIdType
Definition: vtkType.h:327