VTK  9.7.1
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
24 #ifndef vtkCompositeDataSet_h
25 #define vtkCompositeDataSet_h
26 
27 #include "vtkCommonDataModelModule.h" // For export macro
28 #include "vtkDataObject.h"
29 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30 
31 #include <vector> // For GetDataSets
32 
33 VTK_ABI_NAMESPACE_BEGIN
35 class vtkCompositeDataSetInternals;
36 class vtkDataSet;
37 class vtkInformation;
40 
41 class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkCompositeDataSet : public vtkDataObject
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
50  virtual VTK_NEWINSTANCE vtkCompositeDataIterator* NewIterator() = 0;
51 
56  int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_COMPOSITE_DATA_SET; }
57 
63  virtual void CopyStructure(vtkCompositeDataSet* input);
64 
71  virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) = 0;
72 
79  virtual vtkDataObject* GetDataSet(vtkCompositeDataIterator* iter) = 0;
80 
89  virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
90 
95  unsigned long GetActualMemorySize() override;
96 
98 
102  static vtkCompositeDataSet* GetData(vtkInformationVector* v, int i = 0);
104 
108  void Initialize() override;
109 
117  virtual void CompositeShallowCopy(vtkCompositeDataSet* src);
118 
124  virtual vtkIdType GetNumberOfPoints();
125 
131  virtual vtkIdType GetNumberOfCells();
132 
136  vtkIdType GetNumberOfElements(int type) override;
137 
147  void GetBounds(double bounds[6]);
148 
153  static vtkInformationStringKey* NAME();
154 
163  static vtkInformationIntegerKey* CURRENT_PROCESS_CAN_LOAD_BLOCK();
164 
175  template <class DataSetT = vtkDataSet>
176  static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
177 
181  bool SupportsGhostArray(int type) override;
182 
183 protected:
185  ~vtkCompositeDataSet() override;
186 
187 private:
188  vtkCompositeDataSet(const vtkCompositeDataSet&) = delete;
189  void operator=(const vtkCompositeDataSet&) = delete;
190 };
191 
192 VTK_ABI_NAMESPACE_END
193 #include "vtkCompositeDataSet.txx" // for template implementations
194 
195 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void GetBounds(T a, double bds[6])
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
virtual bool SupportsGhostArray(int type)
Returns if this type of data object support ghost array for specified type.
virtual void Initialize()
Restore data object to initial state,.
int vtkIdType
Definition: vtkType.h:363
Key for string values in vtkInformation.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for integer values in vtkInformation.
virtual unsigned long GetActualMemorySize()
Return the actual size of the data in kibibytes (1024 bytes).
#define VTK_NEWINSTANCE
virtual vtkIdType GetNumberOfElements(int type)
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
general representation of visualization data
Definition: vtkDataObject.h:55