VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkInformationQuadratureSchemeDefinitionVectorKey.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 =========================================================================*/ 00024 #ifndef __vtkInformationQuadratureSchemeDefinitionVectorKey_h 00025 #define __vtkInformationQuadratureSchemeDefinitionVectorKey_h 00026 00027 #include "vtkInformationKey.h" 00028 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type. 00029 00030 class vtkInformationQuadratureSchemeDefinitionVectorValue; 00031 class vtkXMLDataElement; 00032 class vtkQuadratureSchemeDefinition; 00033 00034 class VTK_COMMON_EXPORT vtkInformationQuadratureSchemeDefinitionVectorKey : public vtkInformationKey 00035 { 00036 public: 00037 vtkTypeMacro(vtkInformationQuadratureSchemeDefinitionVectorKey,vtkInformationKey); 00038 void PrintSelf(ostream& os, vtkIndent indent); 00040 00042 vtkInformationQuadratureSchemeDefinitionVectorKey( 00043 const char* name, 00044 const char* location); 00045 // 00046 ~vtkInformationQuadratureSchemeDefinitionVectorKey(); 00048 00050 void Clear(vtkInformation* info); 00053 void Resize(vtkInformation* info, int n); 00055 00056 int Size(vtkInformation* info); 00057 int Length(vtkInformation* info){ return this->Size(info); } 00059 00060 void Append(vtkInformation* info, vtkQuadratureSchemeDefinition *value); 00062 void Set(vtkInformation* info, vtkQuadratureSchemeDefinition *value, int i); 00064 00067 void SetRange(vtkInformation* info, 00068 vtkQuadratureSchemeDefinition **source, 00069 int from, 00070 int to, 00071 int n); 00073 00075 00078 void GetRange(vtkInformation *info, 00079 vtkQuadratureSchemeDefinition **dest, 00080 int from, 00081 int to, 00082 int n); 00084 00087 vtkQuadratureSchemeDefinition *Get(vtkInformation* info, int idx); 00088 00089 // _escription: 00090 // Get a pointer to the first vtkQuadratureSchemeDefinition in the vector. We are 00091 // uysing a vector of smart pointers so this is not easy to 00092 // implement. 00093 // vtkQuadratureSchemeDefinition **Get(vtkInformation* info); 00094 00096 00099 virtual void ShallowCopy(vtkInformation* from, vtkInformation* to); 00100 virtual void DeepCopy(vtkInformation* from, vtkInformation* to); 00102 00104 virtual void Print(ostream& os, vtkInformation* info); 00105 00106 // note: I had wanted to make the following interface in vtkInformationKey 00107 // with a defualt implementation that did nothing. but we decided that 00108 // vtkInformationKey class is too important a class to add such an interface 00109 // without a thorough design review. we don't have budget for such a review. 00110 00114 int SaveState(vtkInformation *info, vtkXMLDataElement *element); 00117 int RestoreState(vtkInformation *info, vtkXMLDataElement *element); 00118 00119 private: 00122 void CreateQuadratureSchemeDefinition(); 00125 vtkInformationQuadratureSchemeDefinitionVectorValue *GetQuadratureSchemeDefinitionVector(vtkInformation *info); 00126 00127 // 00128 vtkInformationQuadratureSchemeDefinitionVectorKey(const vtkInformationQuadratureSchemeDefinitionVectorKey&); // Not implemented. 00129 void operator=(const vtkInformationQuadratureSchemeDefinitionVectorKey&); // Not implemented. 00130 }; 00131 00132 #endif