VTK
dox/Common/vtkArraySort.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkArraySort.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 
00041 #ifndef __vtkArraySort_h
00042 #define __vtkArraySort_h
00043 
00044 #include "vtkSystemIncludes.h"
00045 #include <vtksys/stl/vector>
00046 
00047 class VTK_COMMON_EXPORT vtkArraySort
00048 {
00049 public:
00052   vtkArraySort();
00053   
00055   explicit vtkArraySort(vtkIdType i);
00056   
00058   vtkArraySort(vtkIdType i, vtkIdType j);
00059   
00061   vtkArraySort(vtkIdType i, vtkIdType j, vtkIdType k);
00062 
00064   vtkIdType GetDimensions() const;
00065 
00069   void SetDimensions(vtkIdType dimensions);
00070   
00072   vtkIdType& operator[](vtkIdType i);
00073   
00075   const vtkIdType& operator[](vtkIdType i) const;  
00076 
00077   
00079   bool operator==(const vtkArraySort& rhs) const;
00080   
00082 
00083   bool operator!=(const vtkArraySort& rhs) const;
00084   friend ostream& operator<<(
00085     ostream& stream, const vtkArraySort& rhs);
00087   
00088 private:
00089   vtkstd::vector<vtkIdType> Storage;
00090 };
00091 
00092 #endif
00093