VTK  9.3.0
vtkCGNSFileSeriesReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3 // SPDX-License-Identifier: BSD-3-Clause
24 #ifndef vtkCGNSFileSeriesReader_h
25 #define vtkCGNSFileSeriesReader_h
26 
27 #include "vtkIOCGNSReaderModule.h" // for export macros
29 #include "vtkNew.h" // for vtkNew.
30 
31 #include <string> // for std::string
32 #include <vector> // for std::vector
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkCGNSReader;
36 class vtkCGNSSubsetInclusionLattice;
39 
40 class VTKIOCGNSREADER_EXPORT vtkCGNSFileSeriesReader : public vtkMultiBlockDataSetAlgorithm
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
52  vtkGetObjectMacro(Controller, vtkMultiProcessController);
54 
56 
59  virtual void SetReader(vtkCGNSReader* reader);
60  vtkGetObjectMacro(Reader, vtkCGNSReader);
62 
67  int CanReadFile(VTK_FILEPATH const char* filename);
68 
70 
73  void AddFileName(VTK_FILEPATH const char* fname);
76 
78 
82  vtkGetMacro(IgnoreReaderTime, bool);
83  vtkSetMacro(IgnoreReaderTime, bool);
84  vtkBooleanMacro(IgnoreReaderTime, bool);
86 
92  VTK_FILEPATH const char* GetCurrentFileName() const;
93 
99 
100 protected:
103 
108 
116 
122 
126 
127 private:
129  void operator=(const vtkCGNSFileSeriesReader&) = delete;
130  void OnReaderModifiedEvent();
131 
132  vtkMultiProcessController* Controller;
133  unsigned long ReaderObserverId;
134  bool InProcessRequest;
135  std::vector<std::string> ActiveFiles;
136 };
137 
138 VTK_ABI_NAMESPACE_END
139 #endif
Adds support for reading temporal or partitioned CGNS files.
void ChooseActiveFile(int index)
Select the file from this->ActiveFiles at the given index and set that on this->Reader.
void SetController(vtkMultiProcessController *controller)
Get/Set the controller.
virtual void SetReader(vtkCGNSReader *reader)
Get/Set the reader.
vtkNew< vtkFileSeriesHelper > FileSeriesHelper
void RemoveAllFileNames()
Add/remove files names in the file series.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCGNSFileSeriesReader * New()
bool UpdateActiveFileSet(vtkInformation *info)
Update this->ActiveFiles, a collection of files to be read to satisfy the current request.
void AddFileName(VTK_FILEPATH const char *fname)
Add/remove files names in the file series.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to setup the Reader and then forward the pass to the reader.
VTK_FILEPATH const char * GetCurrentFileName() const
Returns the filename being used for current timesteps.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Handles the RequestData pass.
int CanReadFile(VTK_FILEPATH const char *filename)
Test a file for readability.
~vtkCGNSFileSeriesReader() override
vtkCGNSReader creates a multi-block dataset and reads unstructured grids and structured meshes from b...
Definition: vtkCGNSReader.h:41
Helper class to process file series.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Multiprocessing communication superclass.
@ info
Definition: vtkX3D.h:376
@ index
Definition: vtkX3D.h:246
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_FILEPATH