VTK
vtkSortFileNames.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSortFileNames.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
31 #ifndef vtkSortFileNames_h
32 #define vtkSortFileNames_h
33 
34 #include "vtkIOCoreModule.h" // For export macro
35 #include "vtkObject.h"
36 
37 class vtkStringArray;
38 
39 // this is a helper class defined in the .cxx file
40 class vtkStringArrayVector;
41 
42 class VTKIOCORE_EXPORT vtkSortFileNames : public vtkObject
43 {
44 public:
45 
46  vtkTypeMacro(vtkSortFileNames,vtkObject);
47  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
48  static vtkSortFileNames *New();
49 
51 
58  vtkSetMacro(Grouping, int);
59  vtkGetMacro(Grouping, int);
60  vtkBooleanMacro(Grouping, int);
62 
64 
72  vtkSetMacro(NumericSort, int);
73  vtkGetMacro(NumericSort, int);
74  vtkBooleanMacro(NumericSort, int);
76 
78 
82  vtkSetMacro(IgnoreCase, int);
83  vtkGetMacro(IgnoreCase, int);
84  vtkBooleanMacro(IgnoreCase, int);
86 
88 
93  vtkSetMacro(SkipDirectories, int);
94  vtkGetMacro(SkipDirectories, int);
95  vtkBooleanMacro(SkipDirectories, int);
97 
99 
102  void SetInputFileNames(vtkStringArray *input);
103  vtkGetObjectMacro(InputFileNames, vtkStringArray);
105 
109  virtual vtkStringArray *GetFileNames();
110 
118  virtual int GetNumberOfGroups();
119 
125  virtual vtkStringArray *GetNthGroup(int i);
126 
132  virtual void Update();
133 
134 protected:
136  ~vtkSortFileNames() VTK_OVERRIDE;
137 
138  int NumericSort;
139  int IgnoreCase;
140  int Grouping;
141  int SkipDirectories;
142 
143  vtkTimeStamp UpdateTime;
144 
145  vtkStringArray *InputFileNames;
146  vtkStringArray *FileNames;
147  vtkStringArrayVector *Groups;
148 
152  virtual void Execute();
153 
157  virtual void SortFileNames(vtkStringArray *input, vtkStringArray *output);
158 
162  virtual void GroupFileNames(vtkStringArray *input,
163  vtkStringArrayVector *output);
164 
165 
166 private:
167  vtkSortFileNames(const vtkSortFileNames&) VTK_DELETE_FUNCTION;
168  void operator=(const vtkSortFileNames&) VTK_DELETE_FUNCTION;
169 };
170 
171 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:53
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
record modification and/or execution time
Definition: vtkTimeStamp.h:32
a vtkAbstractArray subclass for strings
virtual void Update()
Updates the extensions string.
static const unsigned short Groups[119][1]
a simple class to control print indentation
Definition: vtkIndent.h:33
Group and sort a set of filenames.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...