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 =========================================================================*/
36 #ifndef __vtkInformation_h
37 #define __vtkInformation_h
38 
39 #include "vtkObject.h"
40 
41 // If being "compiled" by gccxml, pretend VTK_COMMON_EXPORT is nothing
42 // for this header file. The per-method usage of VTK_COMMON_EXPORT in
43 // this header file leads to gccxml errors without this workaround.
44 //
45 #ifdef __GCCXML__
46 #undef VTK_COMMON_EXPORT
47 #define VTK_COMMON_EXPORT
48 #endif
49 
50 class vtkDataObject;
51 class vtkExecutive;
64 class vtkInformationKey;
65 class vtkInformationKeyToInformationFriendship;
73 
74 #if defined(_WIN32)
75 # define VTK_INFORMATION_EXPORT
76 #else
77 # define VTK_INFORMATION_EXPORT VTK_COMMON_EXPORT
78 #endif
79 
80 
82 {
83 public:
85  vtkTypeMacro(vtkInformation,vtkObject);
86  VTK_COMMON_EXPORT void PrintSelf(ostream& os, vtkIndent indent);
87  VTK_COMMON_EXPORT void PrintKeys(ostream& os, vtkIndent indent);
88 
92 
97 
99  VTK_COMMON_EXPORT void Clear();
100 
103  VTK_COMMON_EXPORT int GetNumberOfKeys();
104 
110  VTK_COMMON_EXPORT void Copy(vtkInformation* from, int deep=0);
111 
113 
117  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep=0);
118  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDataObjectKey* key, int deep=0);
119  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDoubleVectorKey* key, int deep=0);
120  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationInformationKey* key, int deep=0);
121  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationInformationVectorKey* key, int deep=0);
122  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerKey* key, int deep=0);
123  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerVectorKey* key, int deep=0);
124  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationRequestKey* key, int deep=0);
125  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringKey* key, int deep=0);
126  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringVectorKey* key, int deep=0);
127  VTK_COMMON_EXPORT void CopyEntry(vtkInformation* from, vtkInformationUnsignedLongKey* key, int deep=0);
129 
134  VTK_COMMON_EXPORT void CopyEntries(vtkInformation* from, vtkInformationKeyVectorKey* key, int deep=0);
135 
138 
141 
143 
148 
150 
156 
158 
164 
166 
172 
174 
178  int value2, int value3);
180  int value1, int value2, int value3,
181  int value4, int value5, int value6);
189 
191 
192  VTK_COMMON_EXPORT void Append(vtkInformationStringVectorKey* key, const char* value);
193  VTK_COMMON_EXPORT void Set(vtkInformationStringVectorKey* key, const char* value, int idx = 0);
194  VTK_COMMON_EXPORT const char* Get(vtkInformationStringVectorKey* key, int idx = 0);
199 
201 
209 
211 
212  VTK_COMMON_EXPORT void Set(vtkInformationUnsignedLongKey* key, unsigned long value);
217 
219 
222  VTK_COMMON_EXPORT void Set(vtkInformationDoubleVectorKey* key, double value1,
223  double value2, double value3);
225  double value1, double value2, double value3,
226  double value4, double value5, double value6);
234 
236 
248 
249  // Provide extra overloads of this method to avoid requiring user
250  // code to include the headers for these key types. Avoid wrapping
251  // them because the original method can be called from the wrappers
252  // anyway and this causes a python help string to be too long.
253  //BTX
274 
297  //ETX
298 
300 
301  VTK_COMMON_EXPORT void Set(vtkInformationStringKey* key, const char*);
306 
308 
314 
316 
322 
324 
330 
332 
334  vtkDataObject VTK_WRAP_EXTERN *);
339 
341 
355 
357 
358  VTK_COMMON_EXPORT virtual void Register(vtkObjectBase* o);
359  VTK_COMMON_EXPORT virtual void UnRegister(vtkObjectBase* o);
361 
363 
364  VTK_COMMON_EXPORT void SetRequest(vtkInformationRequestKey* request);
367 
368 #if !defined(__WRAP__)
369 
374  VTK_LEGACY(VTK_FILTERING_EXPORT void CopyEntry(vtkInformation* from, vtkInformationExecutivePortKey* key, int deep=0));
375 
377 
379  VTK_LEGACY(VTK_FILTERING_EXPORT void Append(
382  // Description:
383  // Append an InformationKey-vector-valued entry.
384  // @deprecated Replaced by vtkInformationExecutivePortKey::AppendUnique() as of VTK 5.2.
385  VTK_LEGACY(VTK_FILTERING_EXPORT void AppendUnique(
389 
391 
394  VTK_LEGACY(VTK_FILTERING_EXPORT
396  // Description:
397  // Retrieve/Modify an entry storing a vtkExecutive/port number pair.
398  // @deprecated Replaced by vtkInformationExecutivePortKey::GetExecutive() as of VTK 5.2.
399  VTK_LEGACY(VTK_FILTERING_EXPORT
401  // Description:
402  // Retrieve/Modify an entry storing a vtkExecutive/port number pair.
403  // @deprecated Replaced by vtkInformationExecutivePortKey::GetPort() as of VTK 5.2.
404  VTK_LEGACY(VTK_FILTERING_EXPORT
405  int GetPort(vtkInformationExecutivePortKey* key));
406  // Description:
407  // Retrieve/Modify an entry storing a vtkExecutive/port number pair.
408  // @deprecated Replaced by vtkInformationExecutivePortKey::Get() as of VTK 5.2.
409  VTK_LEGACY(VTK_FILTERING_EXPORT
410  void Get(vtkInformationExecutivePortKey* key, vtkExecutive*& executive, int &port));
411  // Description:
412  // Retrieve/Modify an entry storing a vtkExecutive/port number pair.
413  // @deprecated Replaced by vtkInformationExecutivePortKey::Remove() as of VTK 5.2.
414  VTK_LEGACY(VTK_FILTERING_EXPORT
415  void Remove(vtkInformationExecutivePortKey* key));
416  // Description:
417  // Retrieve/Modify an entry storing a vtkExecutive/port number pair.
418  // @deprecated Replaced by vtkInformationExecutivePortKey::Has() as of VTK 5.2.
419  VTK_LEGACY(VTK_FILTERING_EXPORT
422 
424 
427  VTK_LEGACY(VTK_FILTERING_EXPORT
429  vtkExecutive* executive, int port));
430  // Description:
431  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
432  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::Remove() as of VTK 5.2.
433  VTK_LEGACY(VTK_FILTERING_EXPORT
435  vtkExecutive* executive, int port));
436  // Description:
437  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
438  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::Set() as of VTK 5.2.
439  VTK_LEGACY(VTK_FILTERING_EXPORT
441  vtkExecutive** executives, int* ports, int length));
442  // Description:
443  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
444  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::GetExecutives() as of VTK 5.2.
445  VTK_LEGACY(VTK_FILTERING_EXPORT
447  // Description:
448  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
449  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::GetPorts() as of VTK 5.2.
450  VTK_LEGACY(VTK_FILTERING_EXPORT
451  int* GetPorts(vtkInformationExecutivePortVectorKey* key));
452  // Description:
453  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
454  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::Get() as of VTK 5.2.
455  VTK_LEGACY(VTK_FILTERING_EXPORT
457  vtkExecutive** executives, int* ports));
458  // Description:
459  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
460  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::Length() as of VTK 5.2.
461  VTK_LEGACY(VTK_FILTERING_EXPORT
463  // Description:
464  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
465  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::Remove() as of VTK 5.2.
466  VTK_LEGACY(VTK_FILTERING_EXPORT
468  // Description:
469  // Retrieve/Modify an entry storing a vector of vtkExecutive/port number pairs.
470  // @deprecated Replaced by vtkInformationExecutivePortVectorKey::Has() as of VTK 5.2.
471  VTK_LEGACY(VTK_FILTERING_EXPORT
474 
476 
478  VTK_LEGACY(VTK_FILTERING_EXPORT
480 #endif // !defined(__WRAP__)
481 
482 
483 protected:
486 
487  // Get/Set a map entry directly through the vtkObjectBase instance
488  // representing the value. Used internally to manage the map.
489  VTK_COMMON_EXPORT void SetAsObjectBase(vtkInformationKey* key, vtkObjectBase* value);
491 
492  // Internal implementation details.
494 
495  // Garbage collection support.
497 
498  // Report the object associated with the given key to the collector.
499  VTK_COMMON_EXPORT void ReportAsObjectBase(vtkInformationKey* key,
500  vtkGarbageCollector* collector);
501 
502 private:
503  //BTX
504  friend class vtkInformationKeyToInformationFriendship;
506  //ETX
507 private:
508  VTK_COMMON_EXPORT vtkInformation(const vtkInformation&); // Not implemented.
509  VTK_COMMON_EXPORT void operator=(const vtkInformation&); // Not implemented.
510  vtkInformationRequestKey *Request;
511 };
512 
513 #endif
Key for unsigned long values in vtkInformation.
abstract base class for most VTK objects
Definition: vtkObject.h:60
virtual void Register(vtkObjectBase *o)
Key for vtkInformation values.
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
Key for vtkDataObject values.
vtkInformationInternals * Internal
internal structure for vtkInformation
int vtkIdType
Definition: vtkType.h:255
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:47
Key for string values in vtkInformation.
Detect and break reference loops.
Superclass for vtkInformation keys.
Key for double vector values.
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void UnRegister(vtkObjectBase *o)
a simple class to control print indentation
Definition: vtkIndent.h:37
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.
#define VTK_COMMON_EXPORT
virtual void Modified()
abstract base class for most VTK objects
Definition: vtkObjectBase.h:59
Key for String vector values.
Key for vector-of-keys values.
Key for vtkExecutive/Port value pair vectors.
#define VTK_INFORMATION_EXPORT
Key for double values in vtkInformation.
Store zero or more vtkInformation instances.
static vtkObject * New()
general representation of visualization data
Definition: vtkDataObject.h:70
Key for vtkIdType values in vtkInformation.
Key for vtkExecutive/Port value pairs.