| 118 | } |
| 119 | |
| 120 | vtkStringArray* vtkSortFileNames::GetNthGroup(int i) |
| 121 | { |
| 122 | this->Update(); |
| 123 | |
| 124 | if (!this->GetGrouping()) |
| 125 | { |
| 126 | vtkErrorMacro(<< "GetNthGroup(): Grouping not on."); |
| 127 | return nullptr; |
| 128 | } |
| 129 | |
| 130 | int n = this->Groups->GetNumberOfStringArrays(); |
| 131 | |
| 132 | if (i >= 0 && i < n) |
| 133 | { |
| 134 | return this->Groups->GetStringArray(i); |
| 135 | } |
| 136 | else |
| 137 | { |
| 138 | vtkErrorMacro(<< "GetNthGroup(i): index " << i << " is out of range"); |
| 139 | return nullptr; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | vtkStringArray* vtkSortFileNames::GetFileNames() |
| 144 | { |