VTK  9.0.1
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  vtkTypeMacro(vtkSortFileNames, vtkObject);
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47  static vtkSortFileNames* New();
48 
50 
57  vtkSetMacro(Grouping, vtkTypeBool);
58  vtkGetMacro(Grouping, vtkTypeBool);
59  vtkBooleanMacro(Grouping, vtkTypeBool);
61 
63 
71  vtkSetMacro(NumericSort, vtkTypeBool);
72  vtkGetMacro(NumericSort, vtkTypeBool);
73  vtkBooleanMacro(NumericSort, vtkTypeBool);
75 
77 
81  vtkSetMacro(IgnoreCase, vtkTypeBool);
82  vtkGetMacro(IgnoreCase, vtkTypeBool);
83  vtkBooleanMacro(IgnoreCase, vtkTypeBool);
85 
87 
92  vtkSetMacro(SkipDirectories, vtkTypeBool);
93  vtkGetMacro(SkipDirectories, vtkTypeBool);
94  vtkBooleanMacro(SkipDirectories, vtkTypeBool);
96 
98 
101  void SetInputFileNames(vtkStringArray* input);
102  vtkGetObjectMacro(InputFileNames, vtkStringArray);
104 
108  virtual vtkStringArray* GetFileNames();
109 
117  virtual int GetNumberOfGroups();
118 
124  virtual vtkStringArray* GetNthGroup(int i);
125 
131  virtual void Update();
132 
133 protected:
135  ~vtkSortFileNames() override;
136 
141 
143 
146  vtkStringArrayVector* Groups;
147 
151  virtual void Execute();
152 
156  virtual void SortFileNames(vtkStringArray* input, vtkStringArray* output);
157 
161  virtual void GroupFileNames(vtkStringArray* input, vtkStringArrayVector* output);
162 
163 private:
164  vtkSortFileNames(const vtkSortFileNames&) = delete;
165  void operator=(const vtkSortFileNames&) = delete;
166 };
167 
168 #endif
vtkTypeBool Grouping
vtkTimeStamp UpdateTime
abstract base class for most VTK objects
Definition: vtkObject.h:62
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:32
a vtkAbstractArray subclass for strings
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:33
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