VTK
vtkInformationQuadratureSchemeDefinitionVectorKey.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInformationQuadratureSchemeDefinitionVectorKey.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef __vtkInformationQuadratureSchemeDefinitionVectorKey_h
25 #define __vtkInformationQuadratureSchemeDefinitionVectorKey_h
26 
27 #include "vtkInformationKey.h"
28 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
29 
30 class vtkInformationQuadratureSchemeDefinitionVectorValue;
31 class vtkXMLDataElement;
33 
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent);
40 
43  const char* name,
44  const char* location);
45  //
48 
50 
51  void Clear(vtkInformation* info);
52  // Description:
53  // Resize (extend) the vector to hold n objects. Any new elements
54  // created will be null initialized.
55  void Resize(vtkInformation* info, int n);
56  // Description:
57  // Get the vector's length.
58  int Size(vtkInformation* info);
59  int Length(vtkInformation* info){ return this->Size(info); }
60  // Description:
61  // Put the value on the back of the vector, with reference counting.
62  void Append(vtkInformation* info, vtkQuadratureSchemeDefinition *value);
63  // Description:
64  // Set element i of the vector to value. Resizes the vector
65  // if needed.
66  void Set(vtkInformation* info, vtkQuadratureSchemeDefinition *value, int i);
67  // Description:
68  // Copy n values from the range in source defined by [from from+n-1]
69  // into the range in this vector defined by [to to+n-1]. Resizes
70  // the vector if needed.
71  void SetRange(vtkInformation* info,
73  int from,
74  int to,
75  int n);
77 
79 
82  void GetRange(vtkInformation *info,
84  int from,
85  int to,
86  int n);
88 
91  vtkQuadratureSchemeDefinition *Get(vtkInformation* info, int idx);
92 
93  // _escription:
94  // Get a pointer to the first vtkQuadratureSchemeDefinition in the vector. We are
95  // uysing a vector of smart pointers so this is not easy to
96  // implement.
97  // vtkQuadratureSchemeDefinition **Get(vtkInformation* info);
98 
100 
103  virtual void ShallowCopy(vtkInformation* from, vtkInformation* to);
104  virtual void DeepCopy(vtkInformation* from, vtkInformation* to);
106 
108  virtual void Print(ostream& os, vtkInformation* info);
109 
110  // note: I had wanted to make the following interface in vtkInformationKey
111  // with a defualt implementation that did nothing. but we decided that
112  // vtkInformationKey class is too important a class to add such an interface
113  // without a thorough design review. we don't have budget for such a review.
114 
116 
119  int SaveState(vtkInformation *info, vtkXMLDataElement *element);
120  // Description:
121  // Load key/value pairs from an XML state representation created
122  // with SaveState. Duplicate keys will generate a fatal error.
123  int RestoreState(vtkInformation *info, vtkXMLDataElement *element);
125 
126 private:
128 
130  void CreateQuadratureSchemeDefinition();
131  // Description:
132  // Get the vector associated with this key, if there is
133  // none then associate a new vector with this key and return
134  // that.
135  vtkInformationQuadratureSchemeDefinitionVectorValue *GetQuadratureSchemeDefinitionVector(vtkInformation *info);
137 
138  //
140  void operator=(const vtkInformationQuadratureSchemeDefinitionVectorKey&); // Not implemented.
141 };
142 
143 #endif
virtual void ShallowCopy(vtkInformation *from, vtkInformation *to)=0
Represents an XML element and those nested inside.
virtual void DeepCopy(vtkInformation *from, vtkInformation *to)
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent)
void Print(vtkInformation *info)
Superclass for vtkInformation keys.
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_COMMON_EXPORT