VTK  9.1.0
vtkCGNSFileSeriesReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCGNSFileSeriesReader.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkCGNSFileSeriesReader_h
36 #define vtkCGNSFileSeriesReader_h
37 
38 #include "vtkIOCGNSReaderModule.h" // for export macros
40 #include "vtkNew.h" // for vtkNew.
41 
42 #include <string> // for std::string
43 #include <vector> // for std::vector
44 
45 class vtkCGNSReader;
46 class vtkCGNSSubsetInclusionLattice;
49 
50 class VTKIOCGNSREADER_EXPORT vtkCGNSFileSeriesReader : public vtkMultiBlockDataSetAlgorithm
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
62  vtkGetObjectMacro(Controller, vtkMultiProcessController);
64 
66 
69  virtual void SetReader(vtkCGNSReader* reader);
70  vtkGetObjectMacro(Reader, vtkCGNSReader);
72 
77  int CanReadFile(VTK_FILEPATH const char* filename);
78 
80 
83  void AddFileName(VTK_FILEPATH const char* fname);
86 
88 
92  vtkGetMacro(IgnoreReaderTime, bool);
93  vtkSetMacro(IgnoreReaderTime, bool);
94  vtkBooleanMacro(IgnoreReaderTime, bool);
96 
102  VTK_FILEPATH const char* GetCurrentFileName() const;
103 
108 
109 protected:
112 
117 
125 
131 
135 
136 private:
138  void operator=(const vtkCGNSFileSeriesReader&) = delete;
139  void OnReaderModifiedEvent();
140 
141  vtkMultiProcessController* Controller;
142  unsigned long ReaderObserverId;
143  bool InProcessRequest;
144  std::vector<std::string> ActiveFiles;
145 };
146 
147 #endif
vtkCGNSFileSeriesReader::Reader
vtkCGNSReader * Reader
Definition: vtkCGNSFileSeriesReader.h:133
vtkCGNSFileSeriesReader::GetCurrentFileName
VTK_FILEPATH const char * GetCurrentFileName() const
Returns the filename being used for current timesteps.
VTK_FILEPATH
#define VTK_FILEPATH
Definition: vtkWrappingHints.h:46
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkCGNSFileSeriesReader::New
static vtkCGNSFileSeriesReader * New()
vtkCGNSReader
vtkCGNSReader creates a multi-block dataset and reads unstructured grids, and structured meshes from ...
Definition: vtkCGNSReader.h:56
vtkCGNSFileSeriesReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCGNSFileSeriesReader::IgnoreReaderTime
bool IgnoreReaderTime
Definition: vtkCGNSFileSeriesReader.h:134
vtkFileSeriesHelper
Helper class to process file series.
Definition: vtkFileSeriesHelper.h:44
vtkCGNSFileSeriesReader::ProcessRequest
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to setup the Reader and then forward the pass to the reader.
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:77
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkCGNSFileSeriesReader::FileSeriesHelper
vtkNew< vtkFileSeriesHelper > FileSeriesHelper
Definition: vtkCGNSFileSeriesReader.h:132
vtkCGNSFileSeriesReader::SetController
void SetController(vtkMultiProcessController *controller)
Get/Set the controller.
vtkNew< vtkFileSeriesHelper >
vtkMultiBlockDataSetAlgorithm.h
vtkCGNSFileSeriesReader::UpdateActiveFileSet
bool UpdateActiveFileSet(vtkInformation *info)
Update this->ActiveFiles, a collection of files to be read to satisfy the current request.
vtkCGNSFileSeriesReader::vtkCGNSFileSeriesReader
vtkCGNSFileSeriesReader()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkCGNSFileSeriesReader::AddFileName
void AddFileName(VTK_FILEPATH const char *fname)
Add/remove files names in the file series.
vtkCGNSFileSeriesReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Handles the RequestData pass.
vtkNew.h
vtkCGNSFileSeriesReader
Adds support for reading temporal or partitioned CGNS files.
Definition: vtkCGNSFileSeriesReader.h:51
vtkCGNSFileSeriesReader::~vtkCGNSFileSeriesReader
~vtkCGNSFileSeriesReader() override
vtkCGNSFileSeriesReader::ChooseActiveFile
void ChooseActiveFile(int index)
Select the file from this->ActiveFiles at the given index and set that on this->Reader.
vtkCGNSFileSeriesReader::SetReader
virtual void SetReader(vtkCGNSReader *reader)
Get/Set the reader.
vtkCGNSFileSeriesReader::RemoveAllFileNames
void RemoveAllFileNames()
Add/remove files names in the file series.
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkCGNSFileSeriesReader::CanReadFile
int CanReadFile(VTK_FILEPATH const char *filename)
Test a file for readability.
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:33