VTK
dox/Common/DataModel/vtkInformationQuadratureSchemeDefinitionVectorKey.h
Go to the documentation of this file.
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 "vtkCommonDataModelModule.h" // For export macro
00028 #include "vtkInformationKey.h"
00029 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
00030 
00031 class vtkInformationQuadratureSchemeDefinitionVectorValue;
00032 class vtkXMLDataElement;
00033 class vtkQuadratureSchemeDefinition;
00034 
00035 class VTKCOMMONDATAMODEL_EXPORT vtkInformationQuadratureSchemeDefinitionVectorKey : public vtkInformationKey
00036 {
00037 public:
00038   vtkTypeMacro(vtkInformationQuadratureSchemeDefinitionVectorKey,vtkInformationKey);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043   vtkInformationQuadratureSchemeDefinitionVectorKey(
00044           const char* name,
00045           const char* location);
00046   //
00047   ~vtkInformationQuadratureSchemeDefinitionVectorKey();
00049 
00051   void Clear(vtkInformation* info);
00054   void Resize(vtkInformation* info, int n);
00056 
00057   int Size(vtkInformation* info);
00058   int Length(vtkInformation* info){ return this->Size(info); }
00060 
00061   void Append(vtkInformation* info, vtkQuadratureSchemeDefinition *value);
00063   void Set(vtkInformation* info, vtkQuadratureSchemeDefinition *value, int i);
00065 
00068   void SetRange(vtkInformation* info,
00069                 vtkQuadratureSchemeDefinition **source,
00070                 int from,
00071                 int to,
00072                 int n);
00074 
00076 
00079   void GetRange(vtkInformation *info,
00080                 vtkQuadratureSchemeDefinition **dest,
00081                 int from,
00082                 int to,
00083                 int n);
00085 
00088   vtkQuadratureSchemeDefinition *Get(vtkInformation* info, int idx);
00089 
00090   // _escription:
00091   // Get a pointer to the first vtkQuadratureSchemeDefinition in the vector. We are
00092   // uysing a vector of smart pointers so this is not easy to
00093   // implement.
00094   // vtkQuadratureSchemeDefinition **Get(vtkInformation* info);
00095 
00097 
00100   virtual void ShallowCopy(vtkInformation* from, vtkInformation* to);
00101   virtual void DeepCopy(vtkInformation* from, vtkInformation* to);
00103 
00105   virtual void Print(ostream& os, vtkInformation* info);
00106 
00107   // note: I had wanted to make the following interface in vtkInformationKey
00108   // with a defualt implementation that did nothing. but we decided that
00109   // vtkInformationKey class is too important a class to add such an interface
00110   // without a thorough design review. we don't have budget for such a review.
00111 
00115   int SaveState(vtkInformation *info, vtkXMLDataElement *element);
00118   int RestoreState(vtkInformation *info, vtkXMLDataElement *element);
00119 
00120 private:
00123   void CreateQuadratureSchemeDefinition();
00126   vtkInformationQuadratureSchemeDefinitionVectorValue *GetQuadratureSchemeDefinitionVector(vtkInformation *info);
00127 
00128   //
00129   vtkInformationQuadratureSchemeDefinitionVectorKey(const vtkInformationQuadratureSchemeDefinitionVectorKey&);  // Not implemented.
00130   void operator=(const vtkInformationQuadratureSchemeDefinitionVectorKey&);  // Not implemented.
00131 };
00132 
00133 #endif