VTK  9.1.0
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
37class vtkStringArray;
38
39// this is a helper class defined in the .cxx file
40class vtkStringArrayVector;
41
42class VTKIOCORE_EXPORT vtkSortFileNames : public vtkObject
43{
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
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
102 vtkGetObjectMacro(InputFileNames, vtkStringArray);
104
109
117 virtual int GetNumberOfGroups();
118
125
131 virtual void Update();
132
133protected:
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
163private:
164 vtkSortFileNames(const vtkSortFileNames&) = delete;
165 void operator=(const vtkSortFileNames&) = delete;
166};
167
168#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
Group and sort a set of filenames.
vtkTypeBool SkipDirectories
vtkTypeBool Grouping
void SetInputFileNames(vtkStringArray *input)
Set a list of file names to group and sort.
virtual void Update()
Update the output filenames from the input filenames.
~vtkSortFileNames() override
vtkTypeBool NumericSort
vtkTypeBool IgnoreCase
virtual void SortFileNames(vtkStringArray *input, vtkStringArray *output)
Sort the input string array, and append the results to the output.
static vtkSortFileNames * New()
vtkStringArray * FileNames
virtual int GetNumberOfGroups()
Get the number of groups that the names were split into, if grouping is on.
virtual vtkStringArray * GetNthGroup(int i)
Get the Nth group of file names.
virtual vtkStringArray * GetFileNames()
Get the full list of sorted filenames.
virtual void GroupFileNames(vtkStringArray *input, vtkStringArrayVector *output)
Separate a string array into groups and append them to the output.
vtkTimeStamp UpdateTime
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkStringArray * InputFileNames
vtkStringArrayVector * Groups
virtual void Execute()
Fill the output.
a vtkAbstractArray subclass for strings
record modification and/or execution time
Definition: vtkTimeStamp.h:52
int vtkTypeBool
Definition: vtkABI.h:69