VTK  9.7.1
vtkCompositeCellGridReader.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
14 #ifndef vtkCompositeCellGridReader_h
15 #define vtkCompositeCellGridReader_h
16 
17 #include "vtkIOCellGridModule.h" // For export macro
18 #include "vtkReaderAlgorithm.h"
19 #include "vtkSmartPointer.h" // For SmartPointer
20 
21 #include <string> // For std::string
22 #include <vector> // For std::vector
23 
24 VTK_ABI_NAMESPACE_BEGIN
26 class vtkFieldData;
27 class vtkCellGridDocumentLoader;
28 class vtkImageData;
29 class vtkStringArray;
30 
31 class VTKIOCELLGRID_EXPORT vtkCompositeCellGridReader : public vtkReaderAlgorithm
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
42  vtkSetFilePathMacro(FileName);
43  vtkGetFilePathMacro(FileName);
45 
46  vtkDataArraySelection* GetCellTypeSelection();
47  vtkDataArraySelection* GetCellAttributeSelection();
48 
51  vtkMTimeType GetMTime() override;
52 
53 protected:
55  ~vtkCompositeCellGridReader() override;
56 
58 
59  int ReadMetaData(vtkInformation* metadata) override;
60  int ReadMesh(int, int, int, int, vtkDataObject*) override;
61  int ReadPoints(int, int, int, int, vtkDataObject*) override;
62  int ReadArrays(int, int, int, int, vtkDataObject*) override;
63 
64  bool UpdateMetadata();
65 
66  struct FileGroup
67  {
68  std::vector<std::string> Files;
69  };
70 
71  char* FileName = nullptr;
72  FileGroup Groups; // For now, the reader only supports a single group of files.
75  struct MetadataGuard; // Used to double-buffer Groups, CellTypeSelection, and
76  // CellAttributeSelection.
77  vtkTimeStamp MetadataTime; // The last time metadata was read from disk
78 
79 private:
81  void operator=(const vtkCompositeCellGridReader&) = delete;
82 };
83 
84 VTK_ABI_NAMESPACE_END
85 #endif
virtual int ReadPoints(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read the points.
vtkNew< vtkDataArraySelection > CellTypeSelection
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
record modification and/or execution time
Definition: vtkTimeStamp.h:24
vtkNew< vtkDataArraySelection > CellAttributeSelection
a vtkAbstractArray subclass for strings
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
Store on/off settings for data arrays, etc.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
virtual int ReadArrays(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read all the arrays (point, cell, field etc.).
virtual int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read the mesh (connectivity) for a given set of data partitioning, number of ghost levels and time st...
virtual int ReadMetaData(vtkInformation *metadata)=0
Provide meta-data for the pipeline.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:55
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for readers that implement a simplified API.
Represents and manipulates a collection of data arrays.
Definition: vtkFieldData.h:51