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 =========================================================================*/
34 #ifndef vtkSortFileNames_h
35 #define vtkSortFileNames_h
36 
37 #include "vtkIOCoreModule.h" // For export macro
38 #include "vtkObject.h"
39 
40 class vtkStringArray;
41 
42 // this is a helper class defined in the .cxx file
43 class vtkStringArrayVector;
44 
45 class VTKIOCORE_EXPORT vtkSortFileNames : public vtkObject
46 {
47 public:
48 
49  vtkTypeMacro(vtkSortFileNames,vtkObject);
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51  static vtkSortFileNames *New();
52 
54 
61  vtkSetMacro(Grouping, vtkTypeBool);
62  vtkGetMacro(Grouping, vtkTypeBool);
63  vtkBooleanMacro(Grouping, vtkTypeBool);
65 
67 
75  vtkSetMacro(NumericSort, vtkTypeBool);
76  vtkGetMacro(NumericSort, vtkTypeBool);
77  vtkBooleanMacro(NumericSort, vtkTypeBool);
79 
81 
85  vtkSetMacro(IgnoreCase, vtkTypeBool);
86  vtkGetMacro(IgnoreCase, vtkTypeBool);
87  vtkBooleanMacro(IgnoreCase, vtkTypeBool);
89 
91 
96  vtkSetMacro(SkipDirectories, vtkTypeBool);
97  vtkGetMacro(SkipDirectories, vtkTypeBool);
98  vtkBooleanMacro(SkipDirectories, vtkTypeBool);
100 
102 
105  void SetInputFileNames(vtkStringArray *input);
106  vtkGetObjectMacro(InputFileNames, vtkStringArray);
108 
112  virtual vtkStringArray *GetFileNames();
113 
121  virtual int GetNumberOfGroups();
122 
128  virtual vtkStringArray *GetNthGroup(int i);
129 
135  virtual void Update();
136 
137 protected:
139  ~vtkSortFileNames() override;
140 
145 
147 
150  vtkStringArrayVector *Groups;
151 
155  virtual void Execute();
156 
160  virtual void SortFileNames(vtkStringArray *input, vtkStringArray *output);
161 
165  virtual void GroupFileNames(vtkStringArray *input,
166  vtkStringArrayVector *output);
167 
168 
169 private:
170  vtkSortFileNames(const vtkSortFileNames&) = delete;
171  void operator=(const vtkSortFileNames&) = delete;
172 };
173 
174 #endif
vtkTypeBool Grouping
vtkTimeStamp UpdateTime
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkStringArray * FileNames
record modification and/or execution time
Definition: vtkTimeStamp.h:35
a vtkAbstractArray subclass for strings
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
Group and sort a set of filenames.
vtkStringArray * InputFileNames
vtkTypeBool IgnoreCase
vtkTypeBool NumericSort
vtkStringArrayVector * Groups
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkTypeBool SkipDirectories