Back to index

salome-paravis  6.5.0
vtkMedIntArray.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 // .NAME vtkMedIntArray - dynamic, self-adjusting array of med_int
00021 // .SECTION Description
00022 // vtkMedIntArray is an array of values of type med_int.
00023 // It provides methods for insertion and retrieval of values and will
00024 // automatically resize itself to hold new data.
00025 // If the med_int type is the same as the vtkIdType,
00026 // this class inherits from the
00027 // vtkIdType array, allowing safe shallow copies.
00028 
00029 #ifndef __vtkMedIntArray_h
00030 #define __vtkMedIntArray_h
00031 
00032 #include "vtkMedUtilities.h"
00033 #include "vtkMed.h"
00034 
00035 #include "vtkMedIntArrayInternal.h"
00036 #include "vtkIdTypeArray.h"
00037 #include "vtkIntArray.h"
00038 
00039 //BTX
00040 template <class T1> struct med_int_vtkIdType_Traits : IsSameTraits<T1, med_int>
00041 {
00042   typedef vtkMedIntArrayInternal Superclass;
00043 };
00044 
00045 template <> struct med_int_vtkIdType_Traits<med_int>
00046   : IsSameTraits<med_int, med_int>
00047 {
00048   typedef vtkIdTypeArray Superclass;
00049 };
00050 typedef med_int_vtkIdType_Traits<vtkIdType>::Superclass
00051   vtkMedIntArraySuperclass;
00052 //ETX
00053 
00054 class VTK_EXPORT vtkMedIntArray
00055 //BTX
00056 : public vtkMedIntArraySuperclass
00057 //ETX
00058 {
00059 public :
00060   static vtkMedIntArray* New();
00061   vtkTypeRevisionMacro(vtkMedIntArray,vtkMedIntArraySuperclass);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 protected:
00064   vtkMedIntArray(vtkIdType numComp=1);
00065   ~vtkMedIntArray();
00066 };
00067 
00068 #endif