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 "vtkCommonCoreModule.h" // For export macro
40 #include "vtkObject.h"
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;
76 class vtkVariant;
77 
78 #if defined(_WIN32)
79 # define VTK_INFORMATION_EXPORT
80 #else
81 # define VTK_INFORMATION_EXPORT VTKCOMMONCORE_EXPORT
82 #endif
83 
84 
86 {
87 public:
89  vtkTypeMacro(vtkInformation,vtkObject);
90  VTKCOMMONCORE_EXPORT void PrintSelf(ostream& os, vtkIndent indent);
91  VTKCOMMONCORE_EXPORT void PrintKeys(ostream& os, vtkIndent indent);
92 
96 
101 
103  VTKCOMMONCORE_EXPORT void Clear();
104 
107  VTKCOMMONCORE_EXPORT int GetNumberOfKeys();
108 
114  VTKCOMMONCORE_EXPORT void Copy(vtkInformation* from, int deep=0);
115 
117 
121  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep=0);
122  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDataObjectKey* key, int deep=0);
123  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDoubleVectorKey* key, int deep=0);
124  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationVariantKey* key, int deep=0);
125  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationVariantVectorKey* key, int deep=0);
126  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationInformationKey* key, int deep=0);
128  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerKey* key, int deep=0);
129  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerVectorKey* key, int deep=0);
130  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationRequestKey* key, int deep=0);
131  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringKey* key, int deep=0);
132  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringVectorKey* key, int deep=0);
133  VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationUnsignedLongKey* key, int deep=0);
135 
140  VTKCOMMONCORE_EXPORT void CopyEntries(vtkInformation* from, vtkInformationKeyVectorKey* key, int deep=0);
141 
144 
147 
149 
154 
156 
162 
164 
170 
172 
178 
180 
186 
188 
192  int value2, int value3);
194  int value1, int value2, int value3,
195  int value4, int value5, int value6);
203 
205 
206  VTKCOMMONCORE_EXPORT void Append(vtkInformationStringVectorKey* key, const char* value);
207  VTKCOMMONCORE_EXPORT void Set(vtkInformationStringVectorKey* key, const char* value, int idx = 0);
208  VTKCOMMONCORE_EXPORT const char* Get(vtkInformationStringVectorKey* key, int idx = 0);
213 
215 
223 
225 
231 
233 
236  VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, double value1,
237  double value2, double value3);
239  double value1, double value2, double value3,
240  double value4, double value5, double value6);
248 
250 
254  const vtkVariant& value2, const vtkVariant& value3);
256  const vtkVariant& value1, const vtkVariant& value2, const vtkVariant& value3,
257  const vtkVariant& value4, const vtkVariant& value5, const vtkVariant& value6);
265 
267 
279 
280  // Provide extra overloads of this method to avoid requiring user
281  // code to include the headers for these key types. Avoid wrapping
282  // them because the original method can be called from the wrappers
283  // anyway and this causes a python help string to be too long.
284  //BTX
305 
328  //ETX
329 
331 
332  VTKCOMMONCORE_EXPORT void Set(vtkInformationStringKey* key, const char*);
337 
339 
345 
347 
353 
355 
361 
363 
365  vtkDataObject VTK_WRAP_EXTERN *);
370 
372 
388 
390 
394 
396 
397  VTKCOMMONCORE_EXPORT void SetRequest(vtkInformationRequestKey* request);
400 
401 protected:
404 
405  // Get/Set a map entry directly through the vtkObjectBase instance
406  // representing the value. Used internally to manage the map.
407  VTKCOMMONCORE_EXPORT void SetAsObjectBase(
409  VTKCOMMONCORE_EXPORT const vtkObjectBase* GetAsObjectBase(
410  const vtkInformationKey* key) const;
412 
413  // Internal implementation details.
415 
416  // Garbage collection support.
418 
419  // Report the object associated with the given key to the collector.
420  VTKCOMMONCORE_EXPORT void ReportAsObjectBase(vtkInformationKey* key,
421  vtkGarbageCollector* collector);
422 
423 private:
424  //BTX
425  friend class vtkInformationKeyToInformationFriendship;
427  //ETX
428 private:
429  VTKCOMMONCORE_EXPORT vtkInformation(const vtkInformation&); // Not implemented.
430  VTKCOMMONCORE_EXPORT void operator=(const vtkInformation&); // Not implemented.
431  vtkInformationRequestKey *Request;
432 };
433 
434 #endif
435 // VTK-HeaderTest-Exclude: vtkInformation.h
Key for unsigned long values in vtkInformation.
abstract base class for most VTK objects
Definition: vtkObject.h:61
virtual void Register(vtkObjectBase *o)
Key for vtkInformation values.
Store vtkAlgorithm input/output information.
Key for vtkDataObject values.
#define VTKCOMMONCORE_EXPORT
vtkInformationInternals * Internal
internal structure for vtkInformation
int vtkIdType
Definition: vtkType.h:275
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:51
Key for string values in vtkInformation.
Detect and break reference loops.
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
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:38
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()
abstract base class for most VTK objects
Definition: vtkObjectBase.h:59
Key for variant values in vtkInformation.
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:64
Key for vtkIdType values in vtkInformation.
Key for vtkExecutive/Port value pairs.