Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedProfile.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 #ifndef __vtkMedProfile_h_
21 #define __vtkMedProfile_h_
22
23 #include "vtkObject.h"
24 #include "vtkMed.h"
25
26 class vtkMedIntArray;
27 class vtkMedString;
28 class vtkMedFile;
29
30 class VTK_EXPORT vtkMedProfile : public vtkObject
31 {
32 public :
33   static vtkMedProfile* New();
34   vtkTypeMacro(vtkMedProfile, vtkObject)
35   void PrintSelf(ostream& os, vtkIndent indent);
36
37   // Description:
38   // This is the number of elements of this profile
39   vtkSetMacro(NumberOfElement, vtkIdType);
40   vtkGetMacro(NumberOfElement, vtkIdType);
41
42   // Description:
43   // The name of the profile in the file
44   vtkGetStringMacro(Name);
45   vtkSetStringMacro(Name);
46
47   // Description:
48   // Allocate and clear memory of this profil.
49   virtual void  SetIds(vtkMedIntArray*);
50   vtkGetObjectMacro(Ids, vtkMedIntArray);
51
52   // Description:
53   // return true if the index array is not null and the size match
54   virtual int IsLoaded();
55
56   // Description:
57   // The index of this field in the med file
58   vtkSetMacro(MedIterator, med_int);
59   vtkGetMacro(MedIterator, med_int);
60
61   // Description:
62   // Load the profile ids
63   void  Load();
64
65   // Description:
66   // this is the file where this Profile is stored
67   virtual void  SetParentFile(vtkMedFile*);
68   vtkGetObjectMacro(ParentFile, vtkMedFile);
69
70 protected:
71   vtkMedProfile();
72   virtual ~vtkMedProfile();
73
74   med_int MedIterator;
75   vtkIdType NumberOfElement;
76   vtkMedIntArray* Ids;
77   char* Name;
78   med_geometry_type GeometryType;
79   vtkMedFile* ParentFile;
80
81 private:
82   vtkMedProfile(const vtkMedProfile&); // Not implemented.
83   void operator=(const vtkMedProfile&); // Not implemented.
84
85 };
86
87 #endif //__vtkMedProfil_h_