VTK  9.3.1
vtkArrayRange.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4 
24 #ifndef vtkArrayRange_h
25 #define vtkArrayRange_h
26 
27 #include "vtkArrayCoordinates.h"
28 #include "vtkCommonCoreModule.h" // For export macro
29 #include "vtkSystemIncludes.h"
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKCOMMONCORE_EXPORT vtkArrayRange
33 {
34 public:
36 
40  vtkArrayRange();
41 
47  vtkArrayRange(CoordinateT begin, CoordinateT end);
48 
52  CoordinateT GetBegin() const;
53 
57  CoordinateT GetEnd() const;
58 
62  CoordinateT GetSize() const;
63 
68  bool Contains(const vtkArrayRange& range) const;
69 
73  bool Contains(CoordinateT coordinate) const;
74 
76 
79  VTKCOMMONCORE_EXPORT friend bool operator==(const vtkArrayRange& lhs, const vtkArrayRange& rhs);
80  VTKCOMMONCORE_EXPORT friend bool operator!=(const vtkArrayRange& lhs, const vtkArrayRange& rhs);
82 
86  VTKCOMMONCORE_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayRange& rhs);
87 
88 private:
92  CoordinateT Begin;
93 
95 
98  CoordinateT End;
100 };
101 
102 VTK_ABI_NAMESPACE_END
103 #endif
104 // VTK-HeaderTest-Exclude: vtkArrayRange.h
Stores a half-open range of array coordinates.
Definition: vtkArrayRange.h:32
bool VTKCOMMONCORE_EXPORT operator==(const std::string &a, const vtkStringToken &b)
bool VTKCOMMONCORE_EXPORT operator!=(const std::string &a, const vtkStringToken &b)
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkIndent &o)
vtkArrayCoordinates::CoordinateT CoordinateT
Definition: vtkArrayRange.h:35