Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkInformation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInformation.h,v $
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 =========================================================================*/
00038 #ifndef __vtkInformation_h
00039 #define __vtkInformation_h
00040 
00041 #include "vtkObject.h"
00042 
00043 class vtkDataObject;
00044 class vtkExecutive;
00045 class vtkInformationDataObjectKey;
00046 class vtkInformationDoubleVectorKey;
00047 class vtkInformationExecutiveKey;
00048 class vtkInformationInformationKey;
00049 class vtkInformationInformationVectorKey;
00050 class vtkInformationIntegerKey;
00051 class vtkInformationIntegerVectorKey;
00052 class vtkInformationInternals;
00053 class vtkInformationKey;
00054 class vtkInformationKeyToInformationFriendship;
00055 class vtkInformationKeyVectorKey;
00056 class vtkInformationObjectBaseKey;
00057 class vtkInformationStringKey;
00058 class vtkInformationVector;
00059 
00060 class VTK_FILTERING_EXPORT vtkInformation : public vtkObject
00061 {
00062 public:
00063   static vtkInformation *New();
00064   vtkTypeRevisionMacro(vtkInformation,vtkObject);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066 
00068   void Clear();
00069 
00072   void Copy(vtkInformation* from);
00073 
00075 
00077   void CopyEntry(vtkInformation* from, vtkInformationKey* key);
00078   void CopyEntry(vtkInformation* from, vtkInformationDataObjectKey* key);
00079   void CopyEntry(vtkInformation* from, vtkInformationDoubleVectorKey* key);
00080   void CopyEntry(vtkInformation* from, vtkInformationExecutiveKey* key);
00081   void CopyEntry(vtkInformation* from, vtkInformationInformationKey* key);
00082   void CopyEntry(vtkInformation* from, vtkInformationInformationVectorKey* key);
00083   void CopyEntry(vtkInformation* from, vtkInformationIntegerKey* key);
00084   void CopyEntry(vtkInformation* from, vtkInformationIntegerVectorKey* key);
00085   void CopyEntry(vtkInformation* from, vtkInformationStringKey* key);
00087 
00091   void CopyEntries(vtkInformation* from, vtkInformationKeyVectorKey* key);
00092 
00094 
00095   void Set(vtkInformationIntegerKey* key, int value);
00096   int Get(vtkInformationIntegerKey* key);
00097   void Remove(vtkInformationIntegerKey* key);
00098   int Has(vtkInformationIntegerKey* key);
00100 
00102 
00103   void Append(vtkInformationIntegerVectorKey* key, int value);
00104   void Set(vtkInformationIntegerVectorKey* key, int* value, int length);
00105   int* Get(vtkInformationIntegerVectorKey* key);
00106   void Get(vtkInformationIntegerVectorKey* key, int* value);
00107   int Length(vtkInformationIntegerVectorKey* key);
00108   void Remove(vtkInformationIntegerVectorKey* key);
00109   int Has(vtkInformationIntegerVectorKey* key);
00111 
00113 
00114   void Append(vtkInformationDoubleVectorKey* key, double value);
00115   void Set(vtkInformationDoubleVectorKey* key, double* value, int length);
00116   double* Get(vtkInformationDoubleVectorKey* key);
00117   void Get(vtkInformationDoubleVectorKey* key, double* value);
00118   int Length(vtkInformationDoubleVectorKey* key);
00119   void Remove(vtkInformationDoubleVectorKey* key);
00120   int Has(vtkInformationDoubleVectorKey* key);
00122 
00124 
00125   void Append(vtkInformationKeyVectorKey* key, vtkInformationKey* value);
00126   void Set(vtkInformationKeyVectorKey* key, vtkInformationKey** value, int length);
00127   vtkInformationKey** Get(vtkInformationKeyVectorKey* key);
00128   void Get(vtkInformationKeyVectorKey* key, vtkInformationKey** value);
00129   int Length(vtkInformationKeyVectorKey* key);
00130   void Remove(vtkInformationKeyVectorKey* key);
00131   int Has(vtkInformationKeyVectorKey* key);
00133 
00135 
00136   void Set(vtkInformationStringKey* key, const char*);
00137   const char* Get(vtkInformationStringKey* key);
00138   void Remove(vtkInformationStringKey* key);
00139   int Has(vtkInformationStringKey* key);
00141 
00143 
00144   void Set(vtkInformationInformationKey* key, vtkInformation*);
00145   vtkInformation* Get(vtkInformationInformationKey* key);
00146   void Remove(vtkInformationInformationKey* key);
00147   int Has(vtkInformationInformationKey* key);
00149 
00151 
00152   void Set(vtkInformationInformationVectorKey* key, vtkInformationVector*);
00153   vtkInformationVector* Get(vtkInformationInformationVectorKey* key);
00154   void Remove(vtkInformationInformationVectorKey* key);
00155   int Has(vtkInformationInformationVectorKey* key);
00157 
00159 
00160   void Set(vtkInformationObjectBaseKey* key, vtkObjectBase*);
00161   vtkObjectBase* Get(vtkInformationObjectBaseKey* key);
00162   void Remove(vtkInformationObjectBaseKey* key);
00163   int Has(vtkInformationObjectBaseKey* key);
00165 
00167 
00168   void Set(vtkInformationDataObjectKey* key, vtkDataObject*);
00169   vtkDataObject* Get(vtkInformationDataObjectKey* key);
00170   void Remove(vtkInformationDataObjectKey* key);
00171   int Has(vtkInformationDataObjectKey* key);
00173 
00175 
00176   void Set(vtkInformationExecutiveKey* key, vtkExecutive*);
00177   vtkExecutive* Get(vtkInformationExecutiveKey* key);
00178   void Remove(vtkInformationExecutiveKey* key);
00179   int Has(vtkInformationExecutiveKey* key);
00181 
00183 
00184   static vtkInformationKey* GetKey(vtkInformationDataObjectKey* key);
00185   static vtkInformationKey* GetKey(vtkInformationDoubleVectorKey* key);
00186   static vtkInformationKey* GetKey(vtkInformationExecutiveKey* key);
00187   static vtkInformationKey* GetKey(vtkInformationInformationKey* key);
00188   static vtkInformationKey* GetKey(vtkInformationInformationVectorKey* key);
00189   static vtkInformationKey* GetKey(vtkInformationIntegerKey* key);
00190   static vtkInformationKey* GetKey(vtkInformationIntegerVectorKey* key);
00191   static vtkInformationKey* GetKey(vtkInformationStringKey* key);
00192   static vtkInformationKey* GetKey(vtkInformationKey* key);
00194 
00196   virtual void UnRegister(vtkObjectBase* o);
00197 
00198 protected:
00199   vtkInformation();
00200   ~vtkInformation();
00201 
00202   // Get/Set a map entry directly through the vtkObjectBase instance
00203   // representing the value.  Used internally to manage the map.
00204   void SetAsObjectBase(vtkInformationKey* key, vtkObjectBase* value);
00205   vtkObjectBase* GetAsObjectBase(vtkInformationKey* key);
00206 
00207   // Internal implementation details.
00208   vtkInformationInternals* Internal;
00209 
00210   // Garbage collection support.
00211   virtual void ReportReferences(vtkGarbageCollector*);
00212   virtual void RemoveReferences();
00213   virtual void GarbageCollectionStarting();
00214   int GarbageCollecting;
00215 private:
00216   //BTX
00217   friend class vtkInformationKeyToInformationFriendship;
00218   //ETX
00219 private:
00220   vtkInformation(const vtkInformation&);  // Not implemented.
00221   void operator=(const vtkInformation&);  // Not implemented.
00222 };
00223 
00224 #endif