Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedIntArray.h
1 // Copyright (C) 2010-2011  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // .NAME vtkMedIntArray - dynamic, self-adjusting array of med_int
21 // .SECTION Description
22 // vtkMedIntArray is an array of values of type med_int.
23 // It provides methods for insertion and retrieval of values and will
24 // automatically resize itself to hold new data.
25 // If the med_int type is the same as the vtkIdType,
26 // this class inherits from the
27 // vtkIdType array, allowing safe shallow copies.
28
29 #ifndef __vtkMedIntArray_h
30 #define __vtkMedIntArray_h
31
32 #include "vtkMedUtilities.h"
33 #include "vtkMed.h"
34
35 #include "vtkMedIntArrayInternal.h"
36 #include "vtkIdTypeArray.h"
37 #include "vtkIntArray.h"
38
39 //BTX
40 template <class T1> struct med_int_vtkIdType_Traits : IsSameTraits<T1, med_int>
41 {
42   typedef vtkMedIntArrayInternal Superclass;
43 };
44
45 template <> struct med_int_vtkIdType_Traits<med_int>
46   : IsSameTraits<med_int, med_int>
47 {
48   typedef vtkIdTypeArray Superclass;
49 };
50 typedef med_int_vtkIdType_Traits<vtkIdType>::Superclass
51   vtkMedIntArraySuperclass;
52 //ETX
53
54 class VTK_EXPORT vtkMedIntArray
55 //BTX
56 : public vtkMedIntArraySuperclass
57 //ETX
58 {
59 public :
60   static vtkMedIntArray* New();
61   vtkTypeMacro(vtkMedIntArray,vtkMedIntArraySuperclass);
62   void PrintSelf(ostream& os, vtkIndent indent);
63 protected:
64   vtkMedIntArray(vtkIdType numComp=1);
65   ~vtkMedIntArray();
66 };
67
68 #endif