VTK  9.3.0
vtkCompositeDataSet.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
33 #ifndef vtkCompositeDataSet_h
34 #define vtkCompositeDataSet_h
35 
36 #include "vtkCommonDataModelModule.h" // For export macro
37 #include "vtkDataObject.h"
38 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_3_0
39 
40 #include <vector> // For GetDataSets
41 
42 VTK_ABI_NAMESPACE_BEGIN
44 class vtkCompositeDataSetInternals;
45 class vtkDataSet;
46 class vtkInformation;
49 
50 class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataSet : public vtkDataObject
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
60 
65  int GetDataObjectType() override { return VTK_COMPOSITE_DATA_SET; }
66 
72  virtual void CopyStructure(vtkCompositeDataSet* input);
73 
80  virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) = 0;
81 
89 
98  virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
99 
104  unsigned long GetActualMemorySize() override;
105 
107 
113 
117  void Initialize() override;
118 
127 
131  VTK_DEPRECATED_IN_9_3_0("Use ShallowCopy instead.")
132  virtual void RecursiveShallowCopy(vtkDataObject* src);
133 
139  virtual vtkIdType GetNumberOfPoints();
140 
146  virtual vtkIdType GetNumberOfCells();
147 
151  vtkIdType GetNumberOfElements(int type) override;
152 
162  void GetBounds(double bounds[6]);
163 
167  static vtkInformationStringKey* NAME();
168 
176  static vtkInformationIntegerKey* CURRENT_PROCESS_CAN_LOAD_BLOCK();
177 
188  template <class DataSetT = vtkDataSet>
189  static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
190 
191 protected:
193  ~vtkCompositeDataSet() override;
194 
195 private:
196  vtkCompositeDataSet(const vtkCompositeDataSet&) = delete;
197  void operator=(const vtkCompositeDataSet&) = delete;
198 };
199 
200 VTK_ABI_NAMESPACE_END
201 #include "vtkCompositeDataSet.txx" // for template implementations
202 
203 #endif
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
virtual void SetDataSet(vtkCompositeDataIterator *iter, vtkDataObject *dataObj)=0
Sets the data set at the location pointed by the iterator.
virtual void CompositeShallowCopy(vtkCompositeDataSet *src)
The goal of the method is to copy the data up to the dataset pointers only.
virtual vtkDataObject * GetDataSet(unsigned int flatIndex)
Returns the dataset located at the position pointed by the flatIndex.
static vtkCompositeDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkCompositeDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
virtual vtkCompositeDataIterator * NewIterator()=0
Return a new iterator (the iterator has to be deleted by user).
virtual void CopyStructure(vtkCompositeDataSet *input)
Copies the tree structure from the input.
virtual vtkDataObject * GetDataSet(vtkCompositeDataIterator *iter)=0
Returns the dataset located at the position pointed by the iterator.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
void Initialize() override
Restore data object to initial state,.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
general representation of visualization data
Definition: vtkDataObject.h:64
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
a simple class to control print indentation
Definition: vtkIndent.h:38
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
void GetBounds(T a, double bds[6])
@ vector
Definition: vtkX3D.h:237
@ info
Definition: vtkX3D.h:376
@ type
Definition: vtkX3D.h:516
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition: vtkType.h:315
#define VTK_COMPOSITE_DATA_SET
Definition: vtkType.h:76
#define VTK_NEWINSTANCE