VTK  9.3.20240328
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
43 #ifndef vtkCompositeDataSet_h
44 #define vtkCompositeDataSet_h
45 
46 #include "vtkCommonDataModelModule.h" // For export macro
47 #include "vtkDataObject.h"
48 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_3_0
49 
50 #include <vector> // For GetDataSets
51 
52 VTK_ABI_NAMESPACE_BEGIN
54 class vtkCompositeDataSetInternals;
55 class vtkDataSet;
56 class vtkInformation;
59 
60 class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataSet : public vtkDataObject
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70 
75  int GetDataObjectType() override { return VTK_COMPOSITE_DATA_SET; }
76 
82  virtual void CopyStructure(vtkCompositeDataSet* input);
83 
90  virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) = 0;
91 
99 
108  virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
109 
114  unsigned long GetActualMemorySize() override;
115 
117 
123 
127  void Initialize() override;
128 
137 
141  VTK_DEPRECATED_IN_9_3_0("Use ShallowCopy instead.")
142  virtual void RecursiveShallowCopy(vtkDataObject* src);
143 
149  virtual vtkIdType GetNumberOfPoints();
150 
156  virtual vtkIdType GetNumberOfCells();
157 
161  vtkIdType GetNumberOfElements(int type) override;
162 
172  void GetBounds(double bounds[6]);
173 
177  static vtkInformationStringKey* NAME();
178 
186  static vtkInformationIntegerKey* CURRENT_PROCESS_CAN_LOAD_BLOCK();
187 
198  template <class DataSetT = vtkDataSet>
199  static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
200 
204  bool SupportsGhostArray(int type) override;
205 
206 protected:
208  ~vtkCompositeDataSet() override;
209 
210 private:
211  vtkCompositeDataSet(const vtkCompositeDataSet&) = delete;
212  void operator=(const vtkCompositeDataSet&) = delete;
213 };
214 
215 VTK_ABI_NAMESPACE_END
216 #include "vtkCompositeDataSet.txx" // for template implementations
217 
218 #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
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
a simple class to control print indentation
Definition: vtkIndent.h:108
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