00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkInformation_h
00034 #define __vtkInformation_h
00035
00036 #include "vtkObject.h"
00037
00038 class vtkDataObject;
00039 class vtkExecutive;
00040 class vtkInformationDataObjectKey;
00041 class vtkInformationDoubleKey;
00042 class vtkInformationDoubleVectorKey;
00043 class vtkInformationExecutivePortKey;
00044 class vtkInformationExecutivePortVectorKey;
00045 class vtkInformationIdTypeKey;
00046 class vtkInformationInformationKey;
00047 class vtkInformationInformationVectorKey;
00048 class vtkInformationIntegerKey;
00049 class vtkInformationIntegerPointerKey;
00050 class vtkInformationIntegerVectorKey;
00051 class vtkInformationInternals;
00052 class vtkInformationKey;
00053 class vtkInformationKeyToInformationFriendship;
00054 class vtkInformationKeyVectorKey;
00055 class vtkInformationObjectBaseKey;
00056 class vtkInformationRequestKey;
00057 class vtkInformationStringKey;
00058 class vtkInformationUnsignedLongKey;
00059 class vtkInformationVector;
00060
00061 class VTK_FILTERING_EXPORT vtkInformation : public vtkObject
00062 {
00063 public:
00064 static vtkInformation *New();
00065 vtkTypeRevisionMacro(vtkInformation,vtkObject);
00066 void PrintSelf(ostream& os, vtkIndent indent);
00067
00069 void Clear();
00070
00076 void Copy(vtkInformation* from, int deep=0);
00077
00079
00083 void CopyEntry(vtkInformation* from, vtkInformationKey* key, int deep=0);
00084 void CopyEntry(vtkInformation* from, vtkInformationDataObjectKey* key, int deep=0);
00085 void CopyEntry(vtkInformation* from, vtkInformationDoubleVectorKey* key, int deep=0);
00086 void CopyEntry(vtkInformation* from, vtkInformationExecutivePortKey* key, int deep=0);
00087 void CopyEntry(vtkInformation* from, vtkInformationInformationKey* key, int deep=0);
00088 void CopyEntry(vtkInformation* from, vtkInformationInformationVectorKey* key, int deep=0);
00089 void CopyEntry(vtkInformation* from, vtkInformationIntegerKey* key, int deep=0);
00090 void CopyEntry(vtkInformation* from, vtkInformationIntegerVectorKey* key, int deep=0);
00091 void CopyEntry(vtkInformation* from, vtkInformationRequestKey* key, int deep=0);
00092 void CopyEntry(vtkInformation* from, vtkInformationStringKey* key, int deep=0);
00093 void CopyEntry(vtkInformation* from, vtkInformationUnsignedLongKey* key, int deep=0);
00095
00100 void CopyEntries(vtkInformation* from, vtkInformationKeyVectorKey* key, int deep=0);
00101
00103
00104 void Set(vtkInformationRequestKey* key);
00105 void Remove(vtkInformationRequestKey* key);
00106 int Has(vtkInformationRequestKey* key);
00108
00110
00111 void Set(vtkInformationIntegerKey* key, int value);
00112 int Get(vtkInformationIntegerKey* key);
00113 void Remove(vtkInformationIntegerKey* key);
00114 int Has(vtkInformationIntegerKey* key);
00116
00118
00119 void Set(vtkInformationIdTypeKey* key, vtkIdType value);
00120 vtkIdType Get(vtkInformationIdTypeKey* key);
00121 void Remove(vtkInformationIdTypeKey* key);
00122 int Has(vtkInformationIdTypeKey* key);
00124
00126
00127 void Set(vtkInformationDoubleKey* key, double value);
00128 double Get(vtkInformationDoubleKey* key);
00129 void Remove(vtkInformationDoubleKey* key);
00130 int Has(vtkInformationDoubleKey* key);
00132
00134
00135 void Append(vtkInformationIntegerVectorKey* key, int value);
00136 void Set(vtkInformationIntegerVectorKey* key, int* value, int length);
00137 void Set(vtkInformationIntegerVectorKey* key, int value1,
00138 int value2, int value3);
00139 void Set(vtkInformationIntegerVectorKey* key,
00140 int value1, int value2, int value3,
00141 int value4, int value5, int value6);
00142 int* Get(vtkInformationIntegerVectorKey* key);
00143 void Get(vtkInformationIntegerVectorKey* key, int* value);
00144 int Length(vtkInformationIntegerVectorKey* key);
00145 void Remove(vtkInformationIntegerVectorKey* key);
00146 int Has(vtkInformationIntegerVectorKey* key);
00148
00150
00151 void Set(vtkInformationIntegerPointerKey* key, int* value, int length);
00152 int* Get(vtkInformationIntegerPointerKey* key);
00153 void Get(vtkInformationIntegerPointerKey* key, int* value);
00154 int Length(vtkInformationIntegerPointerKey* key);
00155 void Remove(vtkInformationIntegerPointerKey* key);
00156 int Has(vtkInformationIntegerPointerKey* key);
00158
00160
00161 void Set(vtkInformationUnsignedLongKey* key, unsigned long value);
00162 unsigned long Get(vtkInformationUnsignedLongKey* key);
00163 void Remove(vtkInformationUnsignedLongKey* key);
00164 int Has(vtkInformationUnsignedLongKey* key);
00166
00168
00169 void Append(vtkInformationDoubleVectorKey* key, double value);
00170 void Set(vtkInformationDoubleVectorKey* key, double* value, int length);
00171 void Set(vtkInformationDoubleVectorKey* key, double value1,
00172 double value2, double value3);
00173 void Set(vtkInformationDoubleVectorKey* key,
00174 double value1, double value2, double value3,
00175 double value4, double value5, double value6);
00176 double* Get(vtkInformationDoubleVectorKey* key);
00177 void Get(vtkInformationDoubleVectorKey* key, double* value);
00178 int Length(vtkInformationDoubleVectorKey* key);
00179 void Remove(vtkInformationDoubleVectorKey* key);
00180 int Has(vtkInformationDoubleVectorKey* key);
00182
00184
00185 void Append(vtkInformationKeyVectorKey* key, vtkInformationKey* value);
00186 void AppendUnique(vtkInformationKeyVectorKey* key, vtkInformationKey* value);
00187 void Set(vtkInformationKeyVectorKey* key, vtkInformationKey** value, int length);
00188 void Remove(vtkInformationKeyVectorKey* key, vtkInformationKey* value);
00189 vtkInformationKey** Get(vtkInformationKeyVectorKey* key);
00190 void Get(vtkInformationKeyVectorKey* key, vtkInformationKey** value);
00191 int Length(vtkInformationKeyVectorKey* key);
00192 void Remove(vtkInformationKeyVectorKey* key);
00193 int Has(vtkInformationKeyVectorKey* key);
00195
00196
00197
00198
00199
00200
00201 void Append(vtkInformationKeyVectorKey* key,
00202 vtkInformationDataObjectKey* value);
00203 void Append(vtkInformationKeyVectorKey* key, vtkInformationDoubleKey* value);
00204 void Append(vtkInformationKeyVectorKey* key,
00205 vtkInformationDoubleVectorKey* value);
00206 void Append(vtkInformationKeyVectorKey* key,
00207 vtkInformationExecutivePortKey* value);
00208 void Append(vtkInformationKeyVectorKey* key,
00209 vtkInformationInformationKey* value);
00210 void Append(vtkInformationKeyVectorKey* key,
00211 vtkInformationInformationVectorKey* value);
00212 void Append(vtkInformationKeyVectorKey* key,
00213 vtkInformationIntegerKey* value);
00214 void Append(vtkInformationKeyVectorKey* key,
00215 vtkInformationIntegerVectorKey* value);
00216 void Append(vtkInformationKeyVectorKey* key, vtkInformationStringKey* value);
00217 void Append(vtkInformationKeyVectorKey* key,
00218 vtkInformationObjectBaseKey* value);
00219 void Append(vtkInformationKeyVectorKey* key,
00220 vtkInformationUnsignedLongKey* value);
00221
00222 void AppendUnique(vtkInformationKeyVectorKey* key,
00223 vtkInformationDataObjectKey* value);
00224 void AppendUnique(vtkInformationKeyVectorKey* key,
00225 vtkInformationDoubleKey* value);
00226 void AppendUnique(vtkInformationKeyVectorKey* key,
00227 vtkInformationDoubleVectorKey* value);
00228 void AppendUnique(vtkInformationKeyVectorKey* key,
00229 vtkInformationExecutivePortKey* value);
00230 void AppendUnique(vtkInformationKeyVectorKey* key,
00231 vtkInformationInformationKey* value);
00232 void AppendUnique(vtkInformationKeyVectorKey* key,
00233 vtkInformationInformationVectorKey* value);
00234 void AppendUnique(vtkInformationKeyVectorKey* key,
00235 vtkInformationIntegerKey* value);
00236 void AppendUnique(vtkInformationKeyVectorKey* key,
00237 vtkInformationIntegerVectorKey* value);
00238 void AppendUnique(vtkInformationKeyVectorKey* key,
00239 vtkInformationStringKey* value);
00240 void AppendUnique(vtkInformationKeyVectorKey* key,
00241 vtkInformationObjectBaseKey* value);
00242 void AppendUnique(vtkInformationKeyVectorKey* key,
00243 vtkInformationUnsignedLongKey* value);
00244
00245
00247
00248 void Set(vtkInformationStringKey* key, const char*);
00249 const char* Get(vtkInformationStringKey* key);
00250 void Remove(vtkInformationStringKey* key);
00251 int Has(vtkInformationStringKey* key);
00253
00255
00256 void Set(vtkInformationInformationKey* key, vtkInformation*);
00257 vtkInformation* Get(vtkInformationInformationKey* key);
00258 void Remove(vtkInformationInformationKey* key);
00259 int Has(vtkInformationInformationKey* key);
00261
00263
00264 void Set(vtkInformationInformationVectorKey* key, vtkInformationVector*);
00265 vtkInformationVector* Get(vtkInformationInformationVectorKey* key);
00266 void Remove(vtkInformationInformationVectorKey* key);
00267 int Has(vtkInformationInformationVectorKey* key);
00269
00271
00272 void Set(vtkInformationObjectBaseKey* key, vtkObjectBase*);
00273 vtkObjectBase* Get(vtkInformationObjectBaseKey* key);
00274 void Remove(vtkInformationObjectBaseKey* key);
00275 int Has(vtkInformationObjectBaseKey* key);
00277
00279
00280 void Set(vtkInformationDataObjectKey* key, vtkDataObject*);
00281 vtkDataObject* Get(vtkInformationDataObjectKey* key);
00282 void Remove(vtkInformationDataObjectKey* key);
00283 int Has(vtkInformationDataObjectKey* key);
00285
00287
00288 void Set(vtkInformationExecutivePortKey* key, vtkExecutive*, int);
00289 vtkExecutive* GetExecutive(vtkInformationExecutivePortKey* key);
00290 int GetPort(vtkInformationExecutivePortKey* key);
00291 void Get(vtkInformationExecutivePortKey* key, vtkExecutive*& executive, int &port);
00292 void Remove(vtkInformationExecutivePortKey* key);
00293 int Has(vtkInformationExecutivePortKey* key);
00295
00297
00298 void Append(vtkInformationExecutivePortVectorKey* key,
00299 vtkExecutive* executive, int port);
00300 void Remove(vtkInformationExecutivePortVectorKey* key,
00301 vtkExecutive* executive, int port);
00302 void Set(vtkInformationExecutivePortVectorKey* key,
00303 vtkExecutive** executives, int* ports, int length);
00304 vtkExecutive** GetExecutives(vtkInformationExecutivePortVectorKey* key);
00305 int* GetPorts(vtkInformationExecutivePortVectorKey* key);
00306 void Get(vtkInformationExecutivePortVectorKey* key,
00307 vtkExecutive** executives, int* ports);
00308 int Length(vtkInformationExecutivePortVectorKey* key);
00309 void Remove(vtkInformationExecutivePortVectorKey* key);
00310 int Has(vtkInformationExecutivePortVectorKey* key);
00312
00314
00315 static vtkInformationKey* GetKey(vtkInformationDataObjectKey* key);
00316 static vtkInformationKey* GetKey(vtkInformationDoubleKey* key);
00317 static vtkInformationKey* GetKey(vtkInformationDoubleVectorKey* key);
00318 static vtkInformationKey* GetKey(vtkInformationExecutivePortKey* key);
00319 static vtkInformationKey* GetKey(vtkInformationInformationKey* key);
00320 static vtkInformationKey* GetKey(vtkInformationInformationVectorKey* key);
00321 static vtkInformationKey* GetKey(vtkInformationIntegerKey* key);
00322 static vtkInformationKey* GetKey(vtkInformationIntegerVectorKey* key);
00323 static vtkInformationKey* GetKey(vtkInformationRequestKey* key);
00324 static vtkInformationKey* GetKey(vtkInformationStringKey* key);
00325 static vtkInformationKey* GetKey(vtkInformationKey* key);
00326 static vtkInformationKey* GetKey(vtkInformationUnsignedLongKey* key);
00328
00330
00331 virtual void Register(vtkObjectBase* o);
00332 virtual void UnRegister(vtkObjectBase* o);
00334
00336
00337 void SetRequest(vtkInformationRequestKey *request) { this->Request = request; }
00338 vtkInformationRequestKey *GetRequest() { return this->Request; }
00340
00341 protected:
00342 vtkInformation();
00343 ~vtkInformation();
00344
00345
00346
00347 void SetAsObjectBase(vtkInformationKey* key, vtkObjectBase* value);
00348 vtkObjectBase* GetAsObjectBase(vtkInformationKey* key);
00349
00350
00351 void ExpandTable();
00352
00353
00354 vtkInformationInternals* Internal;
00355
00356
00357 virtual void ReportReferences(vtkGarbageCollector*);
00358
00359
00360 void ReportAsObjectBase(vtkInformationKey* key,
00361 vtkGarbageCollector* collector);
00362
00363 private:
00364
00365 friend class vtkInformationKeyToInformationFriendship;
00366
00367 private:
00368 vtkInformation(const vtkInformation&);
00369 void operator=(const vtkInformation&);
00370 vtkInformationRequestKey *Request;
00371 };
00372
00373 #endif