vtkFileSequenceParser.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkFileSequenceParser.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 =========================================================================*/
27 #ifndef vtkFileSequenceParser_h
28 #define vtkFileSequenceParser_h
29 
30 #include "vtkObject.h"
31 #include "vtkPVVTKExtensionsCoreModule.h" //needed for exports
32 
33 #include <string>
34 
35 namespace vtksys
36 {
37 class RegularExpression;
38 }
39 
41 {
42 public:
43  static vtkFileSequenceParser* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
52  bool ParseFileSequence(const char* file);
53 
58  vtkGetStringMacro(SequenceName);
59 
64  vtkGetMacro(SequenceIndex, int);
65 
71  vtkGetMacro(SequenceIndexString, std::string);
72 
73 protected:
75  ~vtkFileSequenceParser() override;
76 
77  vtksys::RegularExpression* reg_ex;
78  vtksys::RegularExpression* reg_ex2;
79  vtksys::RegularExpression* reg_ex3;
80  vtksys::RegularExpression* reg_ex4;
81  vtksys::RegularExpression* reg_ex5;
82  vtksys::RegularExpression* reg_ex_last;
83 
84  // Used internal so char * allocations are done automatically.
85  vtkSetStringMacro(SequenceName);
86 
87  int SequenceIndex;
88  char* SequenceName;
89  std::string SequenceIndexString;
90 
91 private:
93  void operator=(const vtkFileSequenceParser&) = delete;
94 };
95 
96 #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