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 <memory> // for std::unique_ptr
22 #include <string> // for std::string
23 
24 namespace vtksys
25 {
26 class RegularExpression;
27 }
28 
30 {
31 public:
32  static vtkFileSequenceParser* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
41  bool ParseFileSequence(const char* file);
42 
47  vtkGetStringMacro(SequenceName);
48 
53  vtkGetMacro(SequenceIndex, int);
54 
60  vtkGetMacro(SequenceIndexString, std::string);
61 
62 protected:
64  ~vtkFileSequenceParser() override;
65 
66  std::unique_ptr<vtksys::RegularExpression> reg_ex;
67  std::unique_ptr<vtksys::RegularExpression> reg_ex2;
68  std::unique_ptr<vtksys::RegularExpression> reg_ex3;
69  std::unique_ptr<vtksys::RegularExpression> reg_ex4;
70  std::unique_ptr<vtksys::RegularExpression> reg_ex5;
71  std::unique_ptr<vtksys::RegularExpression> reg_ex6;
72  std::unique_ptr<vtksys::RegularExpression> reg_ex_last;
73 
74  // Used internal so char * allocations are done automatically.
75  vtkSetStringMacro(SequenceName);
76 
77  int SequenceIndex;
78  char* SequenceName;
79  std::string SequenceIndexString;
80 
81 private:
83  void operator=(const vtkFileSequenceParser&) = delete;
84 };
85 
86 #endif
std::unique_ptr< vtksys::RegularExpression > reg_ex6
#define VTKPVVTKEXTENSIONSCORE_EXPORT
std::unique_ptr< vtksys::RegularExpression > reg_ex_last
Parses out the base file name of a file sequence and also the specific index of the given file...
std::unique_ptr< vtksys::RegularExpression > reg_ex5
std::unique_ptr< vtksys::RegularExpression > reg_ex2
std::unique_ptr< vtksys::RegularExpression > reg_ex3
std::unique_ptr< vtksys::RegularExpression > reg_ex4
std::unique_ptr< vtksys::RegularExpression > reg_ex