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(
383 
384 
386  VTK_LEGACY(VTK_FILTERING_EXPORT void AppendUnique(
390 
392 
395  VTK_LEGACY(VTK_FILTERING_EXPORT
398 
399 
402  VTK_LEGACY(VTK_FILTERING_EXPORT
405 
406 
409  VTK_LEGACY(VTK_FILTERING_EXPORT
410  int GetPort(vtkInformationExecutivePortKey* key));
412 
413 
416  VTK_LEGACY(VTK_FILTERING_EXPORT
417  void Get(vtkInformationExecutivePortKey* key, vtkExecutive*& executive, int &port));
419 
420 
423  VTK_LEGACY(VTK_FILTERING_EXPORT
424  void Remove(vtkInformationExecutivePortKey* key));
426 
427 
430  VTK_LEGACY(VTK_FILTERING_EXPORT
433 
435 
438  VTK_LEGACY(VTK_FILTERING_EXPORT
440  vtkExecutive* executive, int port));
442 
443 
446  VTK_LEGACY(VTK_FILTERING_EXPORT
448  vtkExecutive* executive, int port));
450 
451 
454  VTK_LEGACY(VTK_FILTERING_EXPORT
456  vtkExecutive** executives, int* ports, int length));
458 
459 
462  VTK_LEGACY(VTK_FILTERING_EXPORT
465 
466 
469  VTK_LEGACY(VTK_FILTERING_EXPORT
470  int* GetPorts(vtkInformationExecutivePortVectorKey* key));
472 
473 
476  VTK_LEGACY(VTK_FILTERING_EXPORT
478  vtkExecutive** executives, int* ports));
480 
481 
484  VTK_LEGACY(VTK_FILTERING_EXPORT
487 
488 
491  VTK_LEGACY(VTK_FILTERING_EXPORT
494 
495 
498  VTK_LEGACY(VTK_FILTERING_EXPORT
501 
503 
505  VTK_LEGACY(VTK_FILTERING_EXPORT
507 #endif // !defined(__WRAP__)
508 
509 
510 protected:
513 
514  // Get/Set a map entry directly through the vtkObjectBase instance
515  // representing the value. Used internally to manage the map.
516  VTK_COMMON_EXPORT void SetAsObjectBase(vtkInformationKey* key, vtkObjectBase* value);
518 
519  // Internal implementation details.
521 
522  // Garbage collection support.
524 
525  // Report the object associated with the given key to the collector.
526  VTK_COMMON_EXPORT void ReportAsObjectBase(vtkInformationKey* key,
527  vtkGarbageCollector* collector);
528 
529 private:
530  //BTX
531  friend class vtkInformationKeyToInformationFriendship;
533  //ETX
534 private:
535  VTK_COMMON_EXPORT vtkInformation(const vtkInformation&); // Not implemented.
536  VTK_COMMON_EXPORT void operator=(const vtkInformation&); // Not implemented.
537  vtkInformationRequestKey *Request;
538 };
539 
540 #endif