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
40class vtkStringArray;
41
42// this is a helper class defined in the .cxx file
43class vtkStringArrayVector;
44
45class VTKIOCORE_EXPORT vtkSortFileNames : public vtkObject
46{
47public:
48
50 void PrintSelf(ostream& os, vtkIndent indent);
52
54
61 vtkSetMacro(Grouping, int);
62 vtkGetMacro(Grouping, int);
63 vtkBooleanMacro(Grouping, int);
65
67
75 vtkSetMacro(NumericSort, int);
76 vtkGetMacro(NumericSort, int);
77 vtkBooleanMacro(NumericSort, int);
79
81
85 vtkSetMacro(IgnoreCase, int);
86 vtkGetMacro(IgnoreCase, int);
87 vtkBooleanMacro(IgnoreCase, int);
89
91
96 vtkSetMacro(SkipDirectories, int);
97 vtkGetMacro(SkipDirectories, int);
98 vtkBooleanMacro(SkipDirectories, int);
100
102
106 vtkGetObjectMacro(InputFileNames, vtkStringArray);
108
113
121 virtual int GetNumberOfGroups();
122
129
135 virtual void Update();
136
137protected:
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
169private:
170 vtkSortFileNames(const vtkSortFileNames&) VTK_DELETE_FUNCTION;
171 void operator=(const vtkSortFileNames&) VTK_DELETE_FUNCTION;
172};
173
174#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
Group and sort a set of filenames.
void SetInputFileNames(vtkStringArray *input)
Set a list of file names to group and sort.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void Update()
Update the output filenames from the input filenames.
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
vtkStringArray * InputFileNames
vtkStringArrayVector * Groups
virtual void Execute()
Fill the output.
a vtkAbstractArray subclass for strings
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.