VTK  9.3.20240907
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
34VTK_ABI_NAMESPACE_BEGIN
35class vtkCGNSReader;
36class vtkCGNSSubsetInclusionLattice;
39
40class VTKIOCGNSREADER_EXPORT vtkCGNSFileSeriesReader : public vtkMultiBlockDataSetAlgorithm
41{
42public:
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
100protected:
103
108
116
121 void ChooseActiveFile(int index);
122
126
127private:
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
138VTK_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.
VTK_FILEPATH const char * GetCurrentFileName() const
Returns the filename being used for current timesteps.
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.
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.
static vtkCGNSFileSeriesReader * New()
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to setup the Reader and then forward the pass to the reader.
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...
Helper class to process file series.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Multiprocessing communication superclass.
Allocate and hold a VTK object.
Definition vtkNew.h:167
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_FILEPATH