00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkArrayRange.h 00005 00006 ------------------------------------------------------------------------- 00007 Copyright 2008 Sandia Corporation. 00008 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00009 the U.S. Government retains certain rights in this software. 00010 ------------------------------------------------------------------------- 00011 00012 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00013 All rights reserved. 00014 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00015 00016 This software is distributed WITHOUT ANY WARRANTY; without even 00017 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00018 PURPOSE. See the above copyright notice for more information. 00019 00020 =========================================================================*/ 00021 00042 #ifndef __vtkArrayRange_h 00043 #define __vtkArrayRange_h 00044 00045 #include "vtkSystemIncludes.h" 00046 00047 class VTK_COMMON_EXPORT vtkArrayRange 00048 { 00049 public: 00051 vtkArrayRange(); 00052 00055 vtkArrayRange(vtkIdType begin, vtkIdType end); 00056 00058 vtkIdType GetBegin() const; 00059 00061 vtkIdType GetEnd() const; 00062 00064 vtkIdType GetSize() const; 00065 00068 bool Contains(const vtkArrayRange& range) const; 00069 00071 bool Contains(const vtkIdType coordinate) const; 00072 00074 00075 VTK_COMMON_EXPORT friend bool operator==(const vtkArrayRange& lhs, const vtkArrayRange& rhs); 00076 VTK_COMMON_EXPORT friend bool operator!=(const vtkArrayRange& lhs, const vtkArrayRange& rhs); 00078 00080 VTK_COMMON_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayRange& rhs); 00081 00082 private: 00084 vtkIdType Begin; 00085 00087 vtkIdType End; 00088 }; 00089 00090 #endif 00091