VTK
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 =========================================================================*/
34 #ifndef vtkInformation_h
35 #define vtkInformation_h
36 
37 #include "vtkCommonCoreModule.h" // For export macro
38 #include "vtkObject.h"
39 
40 #include <string> // for std::string compat
41 
42 // If being "compiled" by gccxml, pretend VTKCOMMONCORE_EXPORT is nothing
43 // for this header file. The per-method usage of VTKCOMMONCORE_EXPORT in
44 // this header file leads to gccxml errors without this workaround.
45 //
46 #ifdef __GCCXML__
47 #undef VTKCOMMONCORE_EXPORT
48 #define VTKCOMMONCORE_EXPORT
49 #endif
50 
51 class vtkDataObject;
52 class vtkExecutive;
65 class vtkInformationKey;
66 class vtkInformationKeyToInformationFriendship;
77 class vtkVariant;
78 
79 #if defined(_WIN32)
80 # define VTK_INFORMATION_EXPORT
81 #else
82 # define VTK_INFORMATION_EXPORT VTKCOMMONCORE_EXPORT
83 #endif
84 
85 
87 {
88 public:
90  vtkTypeMacro(vtkInformation,vtkObject);
91  VTKCOMMONCORE_EXPORT void PrintSelf(ostream& os, vtkIndent indent) override;
92  VTKCOMMONCORE_EXPORT void PrintKeys(ostream& os, vtkIndent indent);
93 
98  VTKCOMMONCORE_EXPORT void Modified() override;
99 
106 
110  VTKCOMMONCORE_EXPORT void Clear();
111 
116  VTKCOMMONCORE_EXPORT int GetNumberOfKeys();
117 
125  VTKCOMMONCORE_EXPORT void Copy(vtkInformation* from, int deep=0);
126 
133  VTKCOMMONCORE_EXPORT void Append(vtkInformation* from, int deep=0);
134 
136 
142  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep=0);
143  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDataObjectKey* key, int deep=0);
144  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDoubleVectorKey* key, int deep=0);
145  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationVariantKey* key, int deep=0);
146  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationVariantVectorKey* key, int deep=0);
147  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationInformationKey* key, int deep=0);
149  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerKey* key, int deep=0);
150  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerVectorKey* key, int deep=0);
151  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationObjectBaseVectorKey* key, int deep=0);
152  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationRequestKey* key, int deep=0);
153  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringKey* key, int deep=0);
154  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringVectorKey* key, int deep=0);
155  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationUnsignedLongKey* key, int deep=0);
157 
164  VTKCOMMONCORE_EXPORT void CopyEntries(vtkInformation* from, vtkInformationKeyVectorKey* key, int deep=0);
165 
170 
175 
177 
184 
186 
194 
196 
204 
206 
214 
216 
224 
226 
232  int value2, int value3);
234  int value1, int value2, int value3,
235  int value4, int value5, int value6);
243 
245 
248  VTKCOMMONCORE_EXPORT void Append(vtkInformationStringVectorKey* key, const char* value);
249  VTKCOMMONCORE_EXPORT void Set(vtkInformationStringVectorKey* key, const char* value, int idx = 0);
252  VTKCOMMONCORE_EXPORT const char* Get(vtkInformationStringVectorKey* key, int idx = 0);
257 
259 
269 
271 
279 
281 
285  VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, const double* value, int length);
286  VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, double value1,
287  double value2, double value3);
289  double value1, double value2, double value3,
290  double value4, double value5, double value6);
298 
300 
306  const vtkVariant& value2, const vtkVariant& value3);
308  const vtkVariant& value1, const vtkVariant& value2, const vtkVariant& value3,
309  const vtkVariant& value4, const vtkVariant& value5, const vtkVariant& value6);
317 
319 
333 
334  // Provide extra overloads of this method to avoid requiring user
335  // code to include the headers for these key types. Avoid wrapping
336  // them because the original method can be called from the wrappers
337  // anyway and this causes a python help string to be too long.
338 
359 
382 
384 
387  VTKCOMMONCORE_EXPORT void Set(vtkInformationStringKey* key, const char*);
393 
395 
403 
405 
413 
415 
423 
425 
431  vtkObjectBase* value, int idx = 0);
433  int idx = 0);
437  vtkObjectBase *objectToRemove);
439  int indexToRemove);
442 
444 
448  vtkDataObject VTK_WRAP_EXTERN *);
453 
455 
473 
475 
478  VTKCOMMONCORE_EXPORT void Register(vtkObjectBase* o) override;
481 
483 
486  VTKCOMMONCORE_EXPORT void SetRequest(vtkInformationRequestKey* request);
489 
490 protected:
493 
494  // Get/Set a map entry directly through the vtkObjectBase instance
495  // representing the value. Used internally to manage the map.
496  VTKCOMMONCORE_EXPORT void SetAsObjectBase(
498  VTKCOMMONCORE_EXPORT const vtkObjectBase* GetAsObjectBase(
499  const vtkInformationKey* key) const;
501 
502  // Internal implementation details.
504 
505  // Garbage collection support.
507 
508  // Report the object associated with the given key to the collector.
509  VTKCOMMONCORE_EXPORT void ReportAsObjectBase(vtkInformationKey* key,
510  vtkGarbageCollector* collector);
511 
512 private:
513 
514  friend class vtkInformationKeyToInformationFriendship;
516 
517 private:
519  VTKCOMMONCORE_EXPORT void operator=(const vtkInformation&) = delete;
520  vtkInformationRequestKey *Request;
521 };
522 
523 #endif
524 // VTK-HeaderTest-Exclude: vtkInformation.h
Key for unsigned long values in vtkInformation.
abstract base class for most VTK objects
Definition: vtkObject.h:59
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Key for vtkInformation values.
Store vtkAlgorithm input/output information.
Key for vtkDataObject values.
#define VTKCOMMONCORE_EXPORT
vtkInformationInternals * Internal
internal structure for vtkInformation
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:49
Key for string values in vtkInformation.
Detect and break reference loops.
A atomic type representing the union of many types.
Definition: vtkVariant.h:70
Superclass for vtkInformation keys.
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void ReportReferences(vtkGarbageCollector *)
Key for pointer to pointer.
Key for integer values in vtkInformation.
Iterates over keys of an information object.
Key for vtkObjectBase values.
virtual void Modified()
Update the modification time for this object.
abstract base class for most VTK objects
Definition: vtkObjectBase.h:68
Key for variant values in vtkInformation.
Key for vector-of-keys values.
Key for vtkExecutive/Port value pair vectors.
Key for vtkObjectBase vector values.
#define VTK_INFORMATION_EXPORT
Key for double values in vtkInformation.
Store zero or more vtkInformation instances.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
general representation of visualization data
Definition: vtkDataObject.h:64
Key for vtkIdType values in vtkInformation.
Key for vtkExecutive/Port value pairs.