Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedFieldStep.h
1 // Copyright (C) 2010-2012  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 __vtkMedFieldStep_h_
21 #define __vtkMedFieldStep_h_
22
23 #include "vtkObject.h"
24 #include "vtkMedSetGet.h"
25 #include "vtkMed.h"
26 #include "vtkMedUtilities.h"
27
28 class vtkMedString;
29 class vtkMedMesh;
30 class vtkDataArray;
31 class vtkMedFieldOverEntity;
32 class vtkMedField;
33
34 class VTK_EXPORT vtkMedFieldStep: public vtkObject
35 {
36 public:
37   static vtkMedFieldStep* New();
38   vtkTypeRevisionMacro(vtkMedFieldStep, vtkObject);
39   void PrintSelf(ostream& os, vtkIndent indent);
40
41   // Description:
42   // This iterator is used when reading information from the med file
43   vtkSetMacro(MedIterator, med_int);
44   vtkGetMacro(MedIterator, med_int);
45
46   // Description:
47   // The compute step of this field
48   void  SetComputeStep(const vtkMedComputeStep& cs)
49     {
50     this->ComputeStep = cs;
51     }
52   const vtkMedComputeStep& GetComputeStep() const
53     {
54     return this->ComputeStep;
55     }
56
57   // Description:
58   // The compute step of the mesh supporting this field at this step
59   void  SetMeshComputeStep(const vtkMedComputeStep& cs)
60     {
61     this->MeshComputeStep = cs;
62     }
63   const vtkMedComputeStep& GetMeshComputeStep() const
64     {
65     return this->MeshComputeStep;
66     }
67
68   // Description:
69   // Set the number of steps of this field over these cells.
70   vtkGetObjectVectorMacro(FieldOverEntity, vtkMedFieldOverEntity);
71   vtkSetObjectVectorMacro(FieldOverEntity, vtkMedFieldOverEntity);
72
73   // Description:
74   // returns the vtkMedFieldOverEntity for the given Type and Geometry;
75   virtual vtkMedFieldOverEntity*
76           GetFieldOverEntity(const vtkMedEntity&);
77
78   // Description:
79   // The parent field is the one that owns this step
80   virtual void  SetParentField(vtkMedField*);
81   vtkGetObjectMacro(ParentField, vtkMedField);
82
83   // Description:
84   // The parent field is the one that owns this step
85   virtual void  SetPreviousStep(vtkMedFieldStep*);
86   vtkGetObjectMacro(PreviousStep, vtkMedFieldStep);
87
88   virtual void  LoadInformation();
89
90   // Description:
91   // This flag is used to delay loading information on all entity as long as possible
92   vtkSetMacro(EntityInfoLoaded, med_int);
93   vtkGetMacro(EntityInfoLoaded, med_int);
94
95 protected:
96   vtkMedFieldStep();
97   virtual ~vtkMedFieldStep();
98
99   int EntityInfoLoaded;
100   med_int MedIterator;
101   vtkMedComputeStep ComputeStep;
102   vtkMedComputeStep MeshComputeStep;
103   vtkMedField* ParentField;
104   vtkMedFieldStep* PreviousStep;
105
106   //BTX
107   vtkObjectVector<vtkMedFieldOverEntity>* FieldOverEntity;
108   //ETX
109
110 private:
111   vtkMedFieldStep(const vtkMedFieldStep&); // Not implemented.
112   void operator=(const vtkMedFieldStep&); // Not implemented.
113 };
114
115 #endif //__vtkMedFieldStep_h_