VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkInformation.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00036 #ifndef __vtkInformation_h 00037 #define __vtkInformation_h 00038 00039 #include "vtkCommonCoreModule.h" // For export macro 00040 #include "vtkObject.h" 00041 00042 // If being "compiled" by gccxml, pretend VTKCOMMONCORE_EXPORT is nothing 00043 // for this header file. The per-method usage of VTKCOMMONCORE_EXPORT in 00044 // this header file leads to gccxml errors without this workaround. 00045 // 00046 #ifdef __GCCXML__ 00047 #undef VTKCOMMONCORE_EXPORT 00048 #define VTKCOMMONCORE_EXPORT 00049 #endif 00050 00051 class vtkDataObject; 00052 class vtkExecutive; 00053 class vtkInformationDataObjectKey; 00054 class vtkInformationDoubleKey; 00055 class vtkInformationDoubleVectorKey; 00056 class vtkInformationExecutivePortKey; 00057 class vtkInformationExecutivePortVectorKey; 00058 class vtkInformationIdTypeKey; 00059 class vtkInformationInformationKey; 00060 class vtkInformationInformationVectorKey; 00061 class vtkInformationIntegerKey; 00062 class vtkInformationIntegerPointerKey; 00063 class vtkInformationIntegerVectorKey; 00064 class vtkInformationInternals; 00065 class vtkInformationKey; 00066 class vtkInformationKeyToInformationFriendship; 00067 class vtkInformationKeyVectorKey; 00068 class vtkInformationObjectBaseKey; 00069 class vtkInformationRequestKey; 00070 class vtkInformationStringKey; 00071 class vtkInformationStringVectorKey; 00072 class vtkInformationUnsignedLongKey; 00073 class vtkInformationVariantKey; 00074 class vtkInformationVariantVectorKey; 00075 class vtkInformationVector; 00076 class vtkVariant; 00077 00078 #if defined(_WIN32) 00079 # define VTK_INFORMATION_EXPORT 00080 #else 00081 # define VTK_INFORMATION_EXPORT VTKCOMMONCORE_EXPORT 00082 #endif 00083 00084 00085 class VTK_INFORMATION_EXPORT vtkInformation : public vtkObject 00086 { 00087 public: 00088 VTKCOMMONCORE_EXPORT static vtkInformation *New(); 00089 vtkTypeMacro(vtkInformation,vtkObject); 00090 VTKCOMMONCORE_EXPORT void PrintSelf(ostream& os, vtkIndent indent); 00091 VTKCOMMONCORE_EXPORT void PrintKeys(ostream& os, vtkIndent indent); 00092 00095 VTKCOMMONCORE_EXPORT void Modified(); 00096 00100 VTKCOMMONCORE_EXPORT void Modified(vtkInformationKey* key); 00101 00103 VTKCOMMONCORE_EXPORT void Clear(); 00104 00107 VTKCOMMONCORE_EXPORT int GetNumberOfKeys(); 00108 00114 VTKCOMMONCORE_EXPORT void Copy(vtkInformation* from, int deep=0); 00115 00117 00121 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep=0); 00122 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDataObjectKey* key, int deep=0); 00123 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationDoubleVectorKey* key, int deep=0); 00124 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationVariantKey* key, int deep=0); 00125 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationVariantVectorKey* key, int deep=0); 00126 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationInformationKey* key, int deep=0); 00127 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationInformationVectorKey* key, int deep=0); 00128 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerKey* key, int deep=0); 00129 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationIntegerVectorKey* key, int deep=0); 00130 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationRequestKey* key, int deep=0); 00131 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringKey* key, int deep=0); 00132 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationStringVectorKey* key, int deep=0); 00133 VTKCOMMONCORE_EXPORT void CopyEntry(vtkInformation* from, vtkInformationUnsignedLongKey* key, int deep=0); 00135 00140 VTKCOMMONCORE_EXPORT void CopyEntries(vtkInformation* from, vtkInformationKeyVectorKey* key, int deep=0); 00141 00143 VTKCOMMONCORE_EXPORT int Has(vtkInformationKey* key); 00144 00146 VTKCOMMONCORE_EXPORT void Remove(vtkInformationKey* key); 00147 00149 00150 VTKCOMMONCORE_EXPORT void Set(vtkInformationRequestKey* key); 00151 VTKCOMMONCORE_EXPORT void Remove(vtkInformationRequestKey* key); 00152 VTKCOMMONCORE_EXPORT int Has(vtkInformationRequestKey* key); 00154 00156 00157 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerKey* key, int value); 00158 VTKCOMMONCORE_EXPORT int Get(vtkInformationIntegerKey* key); 00159 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerKey* key); 00160 VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerKey* key); 00162 00164 00165 VTKCOMMONCORE_EXPORT void Set(vtkInformationIdTypeKey* key, vtkIdType value); 00166 VTKCOMMONCORE_EXPORT vtkIdType Get(vtkInformationIdTypeKey* key); 00167 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIdTypeKey* key); 00168 VTKCOMMONCORE_EXPORT int Has(vtkInformationIdTypeKey* key); 00170 00172 00173 VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleKey* key, double value); 00174 VTKCOMMONCORE_EXPORT double Get(vtkInformationDoubleKey* key); 00175 VTKCOMMONCORE_EXPORT void Remove(vtkInformationDoubleKey* key); 00176 VTKCOMMONCORE_EXPORT int Has(vtkInformationDoubleKey* key); 00178 00180 00181 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantKey* key, const vtkVariant& value); 00182 VTKCOMMONCORE_EXPORT const vtkVariant& Get(vtkInformationVariantKey* key); 00183 VTKCOMMONCORE_EXPORT void Remove(vtkInformationVariantKey* key); 00184 VTKCOMMONCORE_EXPORT int Has(vtkInformationVariantKey* key); 00186 00188 00189 VTKCOMMONCORE_EXPORT void Append(vtkInformationIntegerVectorKey* key, int value); 00190 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key, int* value, int length); 00191 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key, int value1, 00192 int value2, int value3); 00193 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerVectorKey* key, 00194 int value1, int value2, int value3, 00195 int value4, int value5, int value6); 00196 VTKCOMMONCORE_EXPORT int* Get(vtkInformationIntegerVectorKey* key); 00197 VTKCOMMONCORE_EXPORT int Get(vtkInformationIntegerVectorKey* key, int idx); 00198 VTKCOMMONCORE_EXPORT void Get(vtkInformationIntegerVectorKey* key, int* value); 00199 VTKCOMMONCORE_EXPORT int Length(vtkInformationIntegerVectorKey* key); 00200 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerVectorKey* key); 00201 VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerVectorKey* key); 00203 00205 00206 VTKCOMMONCORE_EXPORT void Append(vtkInformationStringVectorKey* key, const char* value); 00207 VTKCOMMONCORE_EXPORT void Set(vtkInformationStringVectorKey* key, const char* value, int idx = 0); 00208 VTKCOMMONCORE_EXPORT const char* Get(vtkInformationStringVectorKey* key, int idx = 0); 00209 VTKCOMMONCORE_EXPORT int Length(vtkInformationStringVectorKey* key); 00210 VTKCOMMONCORE_EXPORT void Remove(vtkInformationStringVectorKey* key); 00211 VTKCOMMONCORE_EXPORT int Has(vtkInformationStringVectorKey* key); 00213 00215 00216 VTKCOMMONCORE_EXPORT void Set(vtkInformationIntegerPointerKey* key, int* value, int length); 00217 VTKCOMMONCORE_EXPORT int* Get(vtkInformationIntegerPointerKey* key); 00218 VTKCOMMONCORE_EXPORT void Get(vtkInformationIntegerPointerKey* key, int* value); 00219 VTKCOMMONCORE_EXPORT int Length(vtkInformationIntegerPointerKey* key); 00220 VTKCOMMONCORE_EXPORT void Remove(vtkInformationIntegerPointerKey* key); 00221 VTKCOMMONCORE_EXPORT int Has(vtkInformationIntegerPointerKey* key); 00223 00225 00226 VTKCOMMONCORE_EXPORT void Set(vtkInformationUnsignedLongKey* key, unsigned long value); 00227 VTKCOMMONCORE_EXPORT unsigned long Get(vtkInformationUnsignedLongKey* key); 00228 VTKCOMMONCORE_EXPORT void Remove(vtkInformationUnsignedLongKey* key); 00229 VTKCOMMONCORE_EXPORT int Has(vtkInformationUnsignedLongKey* key); 00231 00233 00234 VTKCOMMONCORE_EXPORT void Append(vtkInformationDoubleVectorKey* key, double value); 00235 VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, double* value, int length); 00236 VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, double value1, 00237 double value2, double value3); 00238 VTKCOMMONCORE_EXPORT void Set(vtkInformationDoubleVectorKey* key, 00239 double value1, double value2, double value3, 00240 double value4, double value5, double value6); 00241 VTKCOMMONCORE_EXPORT double* Get(vtkInformationDoubleVectorKey* key); 00242 VTKCOMMONCORE_EXPORT double Get(vtkInformationDoubleVectorKey* key, int idx); 00243 VTKCOMMONCORE_EXPORT void Get(vtkInformationDoubleVectorKey* key, double* value); 00244 VTKCOMMONCORE_EXPORT int Length(vtkInformationDoubleVectorKey* key); 00245 VTKCOMMONCORE_EXPORT void Remove(vtkInformationDoubleVectorKey* key); 00246 VTKCOMMONCORE_EXPORT int Has(vtkInformationDoubleVectorKey* key); 00248 00250 00251 VTKCOMMONCORE_EXPORT void Append(vtkInformationVariantVectorKey* key, const vtkVariant& value); 00252 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key, const vtkVariant* value, int length); 00253 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key, const vtkVariant& value1, 00254 const vtkVariant& value2, const vtkVariant& value3); 00255 VTKCOMMONCORE_EXPORT void Set(vtkInformationVariantVectorKey* key, 00256 const vtkVariant& value1, const vtkVariant& value2, const vtkVariant& value3, 00257 const vtkVariant& value4, const vtkVariant& value5, const vtkVariant& value6); 00258 VTKCOMMONCORE_EXPORT const vtkVariant* Get(vtkInformationVariantVectorKey* key); 00259 VTKCOMMONCORE_EXPORT const vtkVariant& Get(vtkInformationVariantVectorKey* key, int idx); 00260 VTKCOMMONCORE_EXPORT void Get(vtkInformationVariantVectorKey* key, vtkVariant* value); 00261 VTKCOMMONCORE_EXPORT int Length(vtkInformationVariantVectorKey* key); 00262 VTKCOMMONCORE_EXPORT void Remove(vtkInformationVariantVectorKey* key); 00263 VTKCOMMONCORE_EXPORT int Has(vtkInformationVariantVectorKey* key); 00265 00267 00268 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, vtkInformationKey* value); 00269 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, vtkInformationKey* value); 00270 VTKCOMMONCORE_EXPORT void Set(vtkInformationKeyVectorKey* key, vtkInformationKey** value, int length); 00271 VTKCOMMONCORE_EXPORT void Remove(vtkInformationKeyVectorKey* key, vtkInformationKey* value); 00272 VTKCOMMONCORE_EXPORT vtkInformationKey** Get(vtkInformationKeyVectorKey* key); 00273 VTKCOMMONCORE_EXPORT vtkInformationKey* Get(vtkInformationKeyVectorKey* key, int idx); 00274 VTKCOMMONCORE_EXPORT void Get(vtkInformationKeyVectorKey* key, vtkInformationKey** value); 00275 VTKCOMMONCORE_EXPORT int Length(vtkInformationKeyVectorKey* key); 00276 VTKCOMMONCORE_EXPORT void Remove(vtkInformationKeyVectorKey* key); 00277 VTKCOMMONCORE_EXPORT int Has(vtkInformationKeyVectorKey* key); 00279 00280 // Provide extra overloads of this method to avoid requiring user 00281 // code to include the headers for these key types. Avoid wrapping 00282 // them because the original method can be called from the wrappers 00283 // anyway and this causes a python help string to be too long. 00284 //BTX 00285 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00286 vtkInformationDataObjectKey* value); 00287 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, vtkInformationDoubleKey* value); 00288 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00289 vtkInformationDoubleVectorKey* value); 00290 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00291 vtkInformationInformationKey* value); 00292 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00293 vtkInformationInformationVectorKey* value); 00294 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00295 vtkInformationIntegerKey* value); 00296 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00297 vtkInformationIntegerVectorKey* value); 00298 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, vtkInformationStringKey* value); 00299 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00300 vtkInformationStringVectorKey* value); 00301 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00302 vtkInformationObjectBaseKey* value); 00303 VTKCOMMONCORE_EXPORT void Append(vtkInformationKeyVectorKey* key, 00304 vtkInformationUnsignedLongKey* value); 00305 00306 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00307 vtkInformationDataObjectKey* value); 00308 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00309 vtkInformationDoubleKey* value); 00310 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00311 vtkInformationDoubleVectorKey* value); 00312 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00313 vtkInformationInformationKey* value); 00314 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00315 vtkInformationInformationVectorKey* value); 00316 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00317 vtkInformationIntegerKey* value); 00318 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00319 vtkInformationIntegerVectorKey* value); 00320 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00321 vtkInformationStringKey* value); 00322 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00323 vtkInformationStringVectorKey* value); 00324 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00325 vtkInformationObjectBaseKey* value); 00326 VTKCOMMONCORE_EXPORT void AppendUnique(vtkInformationKeyVectorKey* key, 00327 vtkInformationUnsignedLongKey* value); 00328 //ETX 00329 00331 00332 VTKCOMMONCORE_EXPORT void Set(vtkInformationStringKey* key, const char*); 00333 VTKCOMMONCORE_EXPORT const char* Get(vtkInformationStringKey* key); 00334 VTKCOMMONCORE_EXPORT void Remove(vtkInformationStringKey* key); 00335 VTKCOMMONCORE_EXPORT int Has(vtkInformationStringKey* key); 00337 00339 00340 VTKCOMMONCORE_EXPORT void Set(vtkInformationInformationKey* key, vtkInformation*); 00341 VTKCOMMONCORE_EXPORT vtkInformation* Get(vtkInformationInformationKey* key); 00342 VTKCOMMONCORE_EXPORT void Remove(vtkInformationInformationKey* key); 00343 VTKCOMMONCORE_EXPORT int Has(vtkInformationInformationKey* key); 00345 00347 00348 VTKCOMMONCORE_EXPORT void Set(vtkInformationInformationVectorKey* key, vtkInformationVector*); 00349 VTKCOMMONCORE_EXPORT vtkInformationVector* Get(vtkInformationInformationVectorKey* key); 00350 VTKCOMMONCORE_EXPORT void Remove(vtkInformationInformationVectorKey* key); 00351 VTKCOMMONCORE_EXPORT int Has(vtkInformationInformationVectorKey* key); 00353 00355 00356 VTKCOMMONCORE_EXPORT void Set(vtkInformationObjectBaseKey* key, vtkObjectBase*); 00357 VTKCOMMONCORE_EXPORT vtkObjectBase* Get(vtkInformationObjectBaseKey* key); 00358 VTKCOMMONCORE_EXPORT void Remove(vtkInformationObjectBaseKey* key); 00359 VTKCOMMONCORE_EXPORT int Has(vtkInformationObjectBaseKey* key); 00361 00363 00364 VTKCOMMONCORE_EXPORT void Set(vtkInformationDataObjectKey* key, 00365 vtkDataObject VTK_WRAP_EXTERN *); 00366 VTKCOMMONCORE_EXPORT vtkDataObject VTK_WRAP_EXTERN* Get(vtkInformationDataObjectKey* key); 00367 VTKCOMMONCORE_EXPORT void Remove(vtkInformationDataObjectKey* key); 00368 VTKCOMMONCORE_EXPORT int Has(vtkInformationDataObjectKey* key); 00370 00372 00373 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDataObjectKey* key); 00374 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDoubleKey* key); 00375 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationDoubleVectorKey* key); 00376 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationInformationKey* key); 00377 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationInformationVectorKey* key); 00378 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationIntegerKey* key); 00379 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationIntegerVectorKey* key); 00380 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationRequestKey* key); 00381 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationStringKey* key); 00382 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationStringVectorKey* key); 00383 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationKey* key); 00384 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationUnsignedLongKey* key); 00385 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationVariantKey* key); 00386 VTKCOMMONCORE_EXPORT static vtkInformationKey* GetKey(vtkInformationVariantVectorKey* key); 00388 00390 00391 VTKCOMMONCORE_EXPORT virtual void Register(vtkObjectBase* o); 00392 VTKCOMMONCORE_EXPORT virtual void UnRegister(vtkObjectBase* o); 00394 00396 00397 VTKCOMMONCORE_EXPORT void SetRequest(vtkInformationRequestKey* request); 00398 VTKCOMMONCORE_EXPORT vtkInformationRequestKey* GetRequest(); 00400 00401 protected: 00402 VTKCOMMONCORE_EXPORT vtkInformation(); 00403 VTKCOMMONCORE_EXPORT ~vtkInformation(); 00404 00405 // Get/Set a map entry directly through the vtkObjectBase instance 00406 // representing the value. Used internally to manage the map. 00407 VTKCOMMONCORE_EXPORT void SetAsObjectBase( 00408 vtkInformationKey* key, vtkObjectBase* value); 00409 VTKCOMMONCORE_EXPORT const vtkObjectBase* GetAsObjectBase( 00410 const vtkInformationKey* key) const; 00411 VTKCOMMONCORE_EXPORT vtkObjectBase* GetAsObjectBase(vtkInformationKey* key); 00412 00413 // Internal implementation details. 00414 vtkInformationInternals* Internal; 00415 00416 // Garbage collection support. 00417 VTKCOMMONCORE_EXPORT virtual void ReportReferences(vtkGarbageCollector*); 00418 00419 // Report the object associated with the given key to the collector. 00420 VTKCOMMONCORE_EXPORT void ReportAsObjectBase(vtkInformationKey* key, 00421 vtkGarbageCollector* collector); 00422 00423 private: 00424 //BTX 00425 friend class vtkInformationKeyToInformationFriendship; 00426 friend class vtkInformationIterator; 00427 //ETX 00428 private: 00429 VTKCOMMONCORE_EXPORT vtkInformation(const vtkInformation&); // Not implemented. 00430 VTKCOMMONCORE_EXPORT void operator=(const vtkInformation&); // Not implemented. 00431 vtkInformationRequestKey *Request; 00432 }; 00433 00434 #endif 00435 // VTK-HeaderTest-Exclude: vtkInformation.h