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
51class vtkDataObject;
52class vtkExecutive;
66class vtkInformationKeyToInformationFriendship;
77class 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{
88public:
89 VTKCOMMONCORE_EXPORT static vtkInformation *New();
91 VTKCOMMONCORE_EXPORT void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
92 VTKCOMMONCORE_EXPORT void PrintKeys(ostream& os, vtkIndent indent);
93
98 VTKCOMMONCORE_EXPORT void Modified() VTK_OVERRIDE;
99
105 VTKCOMMONCORE_EXPORT void Modified(vtkInformationKey* key);
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);
148 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationInformationVectorKey* 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
169 VTKCOMMONCORE_EXPORT int Has(vtkInformationKey* key);
170
174 VTKCOMMONCORE_EXPORT void Remove(vtkInformationKey* key);
175
177
180 VTKCOMMONCORE_EXPORT void Set(vtkInformationRequestKey* key);
181 VTKCOMMONCORE_EXPORT void Remove(vtkInformationRequestKey* key);
182 VTKCOMMONCORE_EXPORT int Has(vtkInformationRequestKey* key);
184
186
189 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerKey* key, int value);
190 VTKCOMMONCORE_EXPORT int Get(vtkInformationIntegerKey* key);
191 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerKey* key);
192 VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerKey* key);
194
196
199 VTKCOMMONCORE_EXPORT void Set(vtkInformationIdTypeKey* key, vtkIdType value);
200 VTKCOMMONCORE_EXPORT vtkIdType Get(vtkInformationIdTypeKey* key);
201 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIdTypeKey* key);
202 VTKCOMMONCORE_EXPORT int Has(vtkInformationIdTypeKey* key);
204
206
209 VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleKey* key, double value);
210 VTKCOMMONCORE_EXPORT double Get(vtkInformationDoubleKey* key);
211 VTKCOMMONCORE_EXPORT void Remove(vtkInformationDoubleKey* key);
212 VTKCOMMONCORE_EXPORT int Has(vtkInformationDoubleKey* key);
214
216
219 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantKey* key, const vtkVariant& value);
220 VTKCOMMONCORE_EXPORT const vtkVariant& Get(vtkInformationVariantKey* key);
221 VTKCOMMONCORE_EXPORT void Remove(vtkInformationVariantKey* key);
222 VTKCOMMONCORE_EXPORT int Has(vtkInformationVariantKey* key);
224
226
229 VTKCOMMONCORE_EXPORT void Append(vtkInformationIntegerVectorKey* key, int value);
230 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key, const int* value, int length);
231 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key, int value1,
232 int value2, int value3);
233 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key,
234 int value1, int value2, int value3,
235 int value4, int value5, int value6);
236 VTKCOMMONCORE_EXPORT int* Get(vtkInformationIntegerVectorKey* key);
237 VTKCOMMONCORE_EXPORT int Get(vtkInformationIntegerVectorKey* key, int idx);
238 VTKCOMMONCORE_EXPORT void Get(vtkInformationIntegerVectorKey* key, int* value);
239 VTKCOMMONCORE_EXPORT int Length(vtkInformationIntegerVectorKey* key);
240 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerVectorKey* key);
241 VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerVectorKey* key);
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);
250 VTKCOMMONCORE_EXPORT void Append(vtkInformationStringVectorKey* key, const std::string &value);
251 VTKCOMMONCORE_EXPORT void Set(vtkInformationStringVectorKey* key, const std::string &value, int idx = 0);
252 VTKCOMMONCORE_EXPORT const char* Get(vtkInformationStringVectorKey* key, int idx = 0);
253 VTKCOMMONCORE_EXPORT int Length(vtkInformationStringVectorKey* key);
254 VTKCOMMONCORE_EXPORT void Remove(vtkInformationStringVectorKey* key);
255 VTKCOMMONCORE_EXPORT int Has(vtkInformationStringVectorKey* key);
257
259
262 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerPointerKey* key, int* value, int length);
263 VTKCOMMONCORE_EXPORT int* Get(vtkInformationIntegerPointerKey* key);
264 VTKCOMMONCORE_EXPORT void Get(vtkInformationIntegerPointerKey* key, int* value);
265 VTKCOMMONCORE_EXPORT int Length(vtkInformationIntegerPointerKey* key);
266 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerPointerKey* key);
267 VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerPointerKey* key);
269
271
274 VTKCOMMONCORE_EXPORT void Set(vtkInformationUnsignedLongKey* key, unsigned long value);
275 VTKCOMMONCORE_EXPORT unsigned long Get(vtkInformationUnsignedLongKey* key);
276 VTKCOMMONCORE_EXPORT void Remove(vtkInformationUnsignedLongKey* key);
277 VTKCOMMONCORE_EXPORT int Has(vtkInformationUnsignedLongKey* key);
279
281
284 VTKCOMMONCORE_EXPORT void Append(vtkInformationDoubleVectorKey* key, double value);
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);
288 VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key,
289 double value1, double value2, double value3,
290 double value4, double value5, double value6);
291 VTKCOMMONCORE_EXPORT double* Get(vtkInformationDoubleVectorKey* key);
292 VTKCOMMONCORE_EXPORT double Get(vtkInformationDoubleVectorKey* key, int idx);
293 VTKCOMMONCORE_EXPORT void Get(vtkInformationDoubleVectorKey* key, double* value);
294 VTKCOMMONCORE_EXPORT int Length(vtkInformationDoubleVectorKey* key);
295 VTKCOMMONCORE_EXPORT void Remove(vtkInformationDoubleVectorKey* key);
296 VTKCOMMONCORE_EXPORT int Has(vtkInformationDoubleVectorKey* key);
298
300
303 VTKCOMMONCORE_EXPORT void Append(vtkInformationVariantVectorKey* key, const vtkVariant& value);
304 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key, const vtkVariant* value, int length);
305 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key, const vtkVariant& value1,
306 const vtkVariant& value2, const vtkVariant& value3);
307 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key,
308 const vtkVariant& value1, const vtkVariant& value2, const vtkVariant& value3,
309 const vtkVariant& value4, const vtkVariant& value5, const vtkVariant& value6);
310 VTKCOMMONCORE_EXPORT const vtkVariant* Get(vtkInformationVariantVectorKey* key);
311 VTKCOMMONCORE_EXPORT const vtkVariant& Get(vtkInformationVariantVectorKey* key, int idx);
312 VTKCOMMONCORE_EXPORT void Get(vtkInformationVariantVectorKey* key, vtkVariant* value);
313 VTKCOMMONCORE_EXPORT int Length(vtkInformationVariantVectorKey* key);
314 VTKCOMMONCORE_EXPORT void Remove(vtkInformationVariantVectorKey* key);
315 VTKCOMMONCORE_EXPORT int Has(vtkInformationVariantVectorKey* key);
317
319
322 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, vtkInformationKey* value);
323 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, vtkInformationKey* value);
324 VTKCOMMONCORE_EXPORT void Set(vtkInformationKeyVectorKey* key, vtkInformationKey*const * value, int length);
325 VTKCOMMONCORE_EXPORT void Remove(vtkInformationKeyVectorKey* key, vtkInformationKey* value);
327 VTKCOMMONCORE_EXPORT vtkInformationKey* Get(vtkInformationKeyVectorKey* key, int idx);
328 VTKCOMMONCORE_EXPORT void Get(vtkInformationKeyVectorKey* key, vtkInformationKey** value);
329 VTKCOMMONCORE_EXPORT int Length(vtkInformationKeyVectorKey* key);
330 VTKCOMMONCORE_EXPORT void Remove(vtkInformationKeyVectorKey* key);
331 VTKCOMMONCORE_EXPORT int Has(vtkInformationKeyVectorKey* key);
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
339 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
341 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, vtkInformationDoubleKey* value);
342 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
344 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
346 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
348 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
350 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
352 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, vtkInformationStringKey* value);
353 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
355 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
357 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key,
359
360 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
362 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
364 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
366 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
368 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
370 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
372 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
374 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
376 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
378 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
380 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key,
382
384
387 VTKCOMMONCORE_EXPORT void Set(vtkInformationStringKey* key, const char*);
388 VTKCOMMONCORE_EXPORT void Set(vtkInformationStringKey* key, const std::string&);
389 VTKCOMMONCORE_EXPORT const char* Get(vtkInformationStringKey* key);
390 VTKCOMMONCORE_EXPORT void Remove(vtkInformationStringKey* key);
391 VTKCOMMONCORE_EXPORT int Has(vtkInformationStringKey* key);
393
395
398 VTKCOMMONCORE_EXPORT void Set(vtkInformationInformationKey* key, vtkInformation*);
400 VTKCOMMONCORE_EXPORT void Remove(vtkInformationInformationKey* key);
401 VTKCOMMONCORE_EXPORT int Has(vtkInformationInformationKey* key);
403
405
410 VTKCOMMONCORE_EXPORT void Remove(vtkInformationInformationVectorKey* key);
411 VTKCOMMONCORE_EXPORT int Has(vtkInformationInformationVectorKey* key);
413
415
418 VTKCOMMONCORE_EXPORT void Set(vtkInformationObjectBaseKey* key, vtkObjectBase*);
419 VTKCOMMONCORE_EXPORT vtkObjectBase* Get(vtkInformationObjectBaseKey* key);
420 VTKCOMMONCORE_EXPORT void Remove(vtkInformationObjectBaseKey* key);
421 VTKCOMMONCORE_EXPORT int Has(vtkInformationObjectBaseKey* key);
423
425
428 VTKCOMMONCORE_EXPORT void Append(vtkInformationObjectBaseVectorKey* key,
430 VTKCOMMONCORE_EXPORT void Set(vtkInformationObjectBaseVectorKey *key,
431 vtkObjectBase* value, int idx = 0);
433 int idx = 0);
434 VTKCOMMONCORE_EXPORT int Length(vtkInformationObjectBaseVectorKey *key);
435 VTKCOMMONCORE_EXPORT void Remove(vtkInformationObjectBaseVectorKey *key);
436 VTKCOMMONCORE_EXPORT void Remove(vtkInformationObjectBaseVectorKey *key,
437 vtkObjectBase *objectToRemove);
438 VTKCOMMONCORE_EXPORT void Remove(vtkInformationObjectBaseVectorKey *key,
439 int indexToRemove);
440 VTKCOMMONCORE_EXPORT int Has(vtkInformationObjectBaseVectorKey *key);
442
444
447 VTKCOMMONCORE_EXPORT void Set(vtkInformationDataObjectKey* key,
448 vtkDataObject VTK_WRAP_EXTERN *);
449 VTKCOMMONCORE_EXPORT vtkDataObject VTK_WRAP_EXTERN* Get(vtkInformationDataObjectKey* key);
450 VTKCOMMONCORE_EXPORT void Remove(vtkInformationDataObjectKey* key);
451 VTKCOMMONCORE_EXPORT int Has(vtkInformationDataObjectKey* key);
453
455
458 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDataObjectKey* key);
459 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDoubleKey* key);
460 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDoubleVectorKey* key);
461 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationInformationKey* key);
462 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationInformationVectorKey* key);
463 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationIntegerKey* key);
464 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationIntegerVectorKey* key);
465 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationRequestKey* key);
466 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationStringKey* key);
467 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationStringVectorKey* key);
468 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationKey* key);
469 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationUnsignedLongKey* key);
470 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationVariantKey* key);
471 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationVariantVectorKey* key);
473
475
478 VTKCOMMONCORE_EXPORT void Register(vtkObjectBase* o) VTK_OVERRIDE;
479 VTKCOMMONCORE_EXPORT void UnRegister(vtkObjectBase* o) VTK_OVERRIDE;
481
483
486 VTKCOMMONCORE_EXPORT void SetRequest(vtkInformationRequestKey* request);
487 VTKCOMMONCORE_EXPORT vtkInformationRequestKey* GetRequest();
489
490protected:
491 VTKCOMMONCORE_EXPORT vtkInformation();
492 VTKCOMMONCORE_EXPORT ~vtkInformation() VTK_OVERRIDE;
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;
500 VTKCOMMONCORE_EXPORT vtkObjectBase* GetAsObjectBase(vtkInformationKey* key);
501
502 // Internal implementation details.
504
505 // Garbage collection support.
506 VTKCOMMONCORE_EXPORT void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
507
508 // Report the object associated with the given key to the collector.
509 VTKCOMMONCORE_EXPORT void ReportAsObjectBase(vtkInformationKey* key,
510 vtkGarbageCollector* collector);
511
512private:
513
514 friend class vtkInformationKeyToInformationFriendship;
516
517private:
518 VTKCOMMONCORE_EXPORT vtkInformation(const vtkInformation&) VTK_DELETE_FUNCTION;
519 VTKCOMMONCORE_EXPORT void operator=(const vtkInformation&) VTK_DELETE_FUNCTION;
521};
522
523#endif
524// VTK-HeaderTest-Exclude: vtkInformation.h
general representation of visualization data
Definition: vtkDataObject.h:65
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:50
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:40
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.
VTKCOMMONCORE_EXPORT void Modified() override
Modified signature with no arguments that calls Modified on vtkObject superclass.
VTKCOMMONCORE_EXPORT void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static VTKCOMMONCORE_EXPORT vtkInformation * New()
VTKCOMMONCORE_EXPORT void PrintKeys(ostream &os, vtkIndent indent)
abstract base class for most VTK objects
Definition: vtkObjectBase.h:66
abstract base class for most VTK objects
Definition: vtkObject.h:60
A atomic type representing the union of many types.
Definition: vtkVariant.h:76
@ key
Definition: vtkX3D.h:257
@ length
Definition: vtkX3D.h:393
@ value
Definition: vtkX3D.h:220
@ data
Definition: vtkX3D.h:315
#define VTK_INFORMATION_EXPORT
int vtkIdType
Definition: vtkType.h:287