VTK
dox/Common/vtkArrayRange.h
Go to the documentation of this file.
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 
00043 #ifndef __vtkArrayRange_h
00044 #define __vtkArrayRange_h
00045 
00046 #include "vtkSystemIncludes.h"
00047 #include "vtkArrayCoordinates.h"
00048 
00049 class VTK_COMMON_EXPORT vtkArrayRange
00050 {
00051 public:
00052   typedef vtkArrayCoordinates::CoordinateT CoordinateT;
00053 
00055   vtkArrayRange();
00056 
00059   vtkArrayRange(CoordinateT begin, CoordinateT end);
00060 
00062   CoordinateT GetBegin() const;
00063 
00065   CoordinateT GetEnd() const;
00066 
00068   CoordinateT GetSize() const;
00069 
00072   bool Contains(const vtkArrayRange& range) const;
00073 
00075   bool Contains(const CoordinateT coordinate) const;
00076 
00078 
00079   VTK_COMMON_EXPORT friend bool operator==(const vtkArrayRange& lhs, const vtkArrayRange& rhs);
00080   VTK_COMMON_EXPORT friend bool operator!=(const vtkArrayRange& lhs, const vtkArrayRange& rhs);
00082 
00084   VTK_COMMON_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayRange& rhs);
00085 
00086 private:
00088   CoordinateT Begin;
00089 
00091 
00092   CoordinateT End;
00093 };
00095 
00096 #endif