00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkArrayRange.h,v $ 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 00039 #ifndef __vtkArrayRange_h 00040 #define __vtkArrayRange_h 00041 00042 #include "vtkSystemIncludes.h" 00043 00044 class VTK_COMMON_EXPORT vtkArrayRange 00045 { 00046 public: 00048 vtkArrayRange(); 00049 00052 vtkArrayRange(vtkIdType begin, vtkIdType end); 00053 00055 vtkIdType GetBegin() const; 00056 00058 vtkIdType GetEnd() const; 00059 00061 vtkIdType GetSize() const; 00062 00065 bool Contains(const vtkArrayRange& range) const; 00066 00068 bool Contains(const vtkIdType coordinate) const; 00069 00071 00072 VTK_COMMON_EXPORT friend bool operator==(const vtkArrayRange& lhs, const vtkArrayRange& rhs); 00073 VTK_COMMON_EXPORT friend bool operator!=(const vtkArrayRange& lhs, const vtkArrayRange& rhs); 00075 00077 VTK_COMMON_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayRange& rhs); 00078 00079 private: 00081 vtkIdType Begin; 00082 00084 vtkIdType End; 00085 }; 00086 00087 #endif 00088