VTK
dox/Common/Core/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 "vtkCommonCoreModule.h" // For export macro
00047 #include "vtkSystemIncludes.h"
00048 #include "vtkArrayCoordinates.h"
00049 
00050 class VTKCOMMONCORE_EXPORT vtkArrayRange
00051 {
00052 public:
00053   typedef vtkArrayCoordinates::CoordinateT CoordinateT;
00054 
00056   vtkArrayRange();
00057 
00060   vtkArrayRange(CoordinateT begin, CoordinateT end);
00061 
00063   CoordinateT GetBegin() const;
00064 
00066   CoordinateT GetEnd() const;
00067 
00069   CoordinateT GetSize() const;
00070 
00073   bool Contains(const vtkArrayRange& range) const;
00074 
00076   bool Contains(const CoordinateT coordinate) const;
00077 
00079 
00080   VTKCOMMONCORE_EXPORT friend bool operator==(const vtkArrayRange& lhs, const vtkArrayRange& rhs);
00081   VTKCOMMONCORE_EXPORT friend bool operator!=(const vtkArrayRange& lhs, const vtkArrayRange& rhs);
00083 
00085   VTKCOMMONCORE_EXPORT friend ostream& operator<<(ostream& stream, const vtkArrayRange& rhs);
00086 
00087 private:
00089   CoordinateT Begin;
00090 
00092 
00093   CoordinateT End;
00094 };
00096 
00097 #endif
00098 // VTK-HeaderTest-Exclude: vtkArrayRange.h