ParaView
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 "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
32 
33 namespace vtksys
34 {
35 class RegularExpression;
36 }
37 
38 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkFileSequenceParser : public vtkObject
39 {
40 public:
41  static vtkFileSequenceParser* New();
42  vtkTypeMacro(vtkFileSequenceParser, vtkObject);
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
50  bool ParseFileSequence(char* file);
51 
52  vtkGetStringMacro(SequenceName);
53  vtkGetMacro(SequenceIndex, int);
54 
55 protected:
58 
59  vtksys::RegularExpression* reg_ex;
60  vtksys::RegularExpression* reg_ex2;
61  vtksys::RegularExpression* reg_ex3;
62  vtksys::RegularExpression* reg_ex4;
63  vtksys::RegularExpression* reg_ex5;
64  vtksys::RegularExpression* reg_ex_last;
65 
66  // Used internall so char * allocations are done automatically.
67  vtkSetStringMacro(SequenceName);
68 
69  int SequenceIndex;
70  char* SequenceName;
71 
72 private:
73  vtkFileSequenceParser(const vtkFileSequenceParser&) VTK_DELETE_FUNCTION;
74  void operator=(const vtkFileSequenceParser&) VTK_DELETE_FUNCTION;
75 };
76 
77 #endif
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