vtkFileSequenceParser.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkFileSequenceParser_h
16 #define vtkFileSequenceParser_h
17 
18 #include "vtkObject.h"
19 #include "vtkPVVTKExtensionsCoreModule.h" //needed for exports
20 
21 #include <string> // for std::string
22 
23 namespace vtksys
24 {
25 class RegularExpression;
26 }
27 
29 {
30 public:
31  static vtkFileSequenceParser* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
40  bool ParseFileSequence(const char* file);
41 
46  vtkGetStringMacro(SequenceName);
47 
52  vtkGetMacro(SequenceIndex, int);
53 
59  vtkGetMacro(SequenceIndexString, std::string);
60 
61 protected:
63  ~vtkFileSequenceParser() override;
64 
65  vtksys::RegularExpression* reg_ex;
66  vtksys::RegularExpression* reg_ex2;
67  vtksys::RegularExpression* reg_ex3;
68  vtksys::RegularExpression* reg_ex4;
69  vtksys::RegularExpression* reg_ex5;
70  vtksys::RegularExpression* reg_ex_last;
71 
72  // Used internal so char * allocations are done automatically.
73  vtkSetStringMacro(SequenceName);
74 
75  int SequenceIndex;
76  char* SequenceName;
77  std::string SequenceIndexString;
78 
79 private:
81  void operator=(const vtkFileSequenceParser&) = delete;
82 };
83 
84 #endif
#define VTKPVVTKEXTENSIONSCORE_EXPORT
Parses out the base file name of a file sequence and also the specific index of the given file...
vtksys::RegularExpression * reg_ex3
vtksys::RegularExpression * reg_ex4
vtksys::RegularExpression * reg_ex2
vtksys::RegularExpression * reg_ex5
vtksys::RegularExpression * reg_ex
vtksys::RegularExpression * reg_ex_last