VTK  9.4.20241118
vtkSortFileNames.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
22#ifndef vtkSortFileNames_h
23#define vtkSortFileNames_h
24
25#include "vtkIOCoreModule.h" // For export macro
26#include "vtkObject.h"
27
28VTK_ABI_NAMESPACE_BEGIN
29class vtkStringArray;
30
31// this is a helper class defined in the .cxx file
32class vtkStringArrayVector;
33
34class VTKIOCORE_EXPORT vtkSortFileNames : public vtkObject
35{
36public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
49 vtkSetMacro(Grouping, vtkTypeBool);
50 vtkGetMacro(Grouping, vtkTypeBool);
51 vtkBooleanMacro(Grouping, vtkTypeBool);
53
55
63 vtkSetMacro(NumericSort, vtkTypeBool);
64 vtkGetMacro(NumericSort, vtkTypeBool);
65 vtkBooleanMacro(NumericSort, vtkTypeBool);
67
69
73 vtkSetMacro(IgnoreCase, vtkTypeBool);
74 vtkGetMacro(IgnoreCase, vtkTypeBool);
75 vtkBooleanMacro(IgnoreCase, vtkTypeBool);
77
79
84 vtkSetMacro(SkipDirectories, vtkTypeBool);
85 vtkGetMacro(SkipDirectories, vtkTypeBool);
86 vtkBooleanMacro(SkipDirectories, vtkTypeBool);
88
90
94 vtkGetObjectMacro(InputFileNames, vtkStringArray);
96
101
109 virtual int GetNumberOfGroups();
110
117
123 virtual void Update();
124
125protected:
128
133
135
138 vtkStringArrayVector* Groups;
139
143 virtual void Execute();
144
148 virtual void SortFileNames(vtkStringArray* input, vtkStringArray* output);
149
153 virtual void GroupFileNames(vtkStringArray* input, vtkStringArrayVector* output);
154
155private:
156 vtkSortFileNames(const vtkSortFileNames&) = delete;
157 void operator=(const vtkSortFileNames&) = delete;
158};
159
160VTK_ABI_NAMESPACE_END
161#endif
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
Group and sort a set of filenames.
vtkTypeBool SkipDirectories
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
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
int vtkTypeBool
Definition vtkABI.h:64