Salome HOME
Update Help for VISU module.
[modules/visu.git] / src / CONVERTOR / VISU_MedConvertor.hxx
1 //  Copyright (C) 2003  CEA/DEN, EDF R&D
2 //
3 //
4 //
5 //  File   : VISU_MedConvertor.hxx
6 //  Author : Alexey PETROV
7 //  Module : VISU
8
9 #ifndef VISU_MedConvertor_HeaderFile
10 #define VISU_MedConvertor_HeaderFile
11
12 #include "VISU_Convertor_impl.hxx"
13
14 #include "MED_Common.hxx"
15
16 namespace VISU{
17
18   struct TMEDMesh: TMeshImpl{
19     MED::PMeshInfo myMeshInfo;
20     MED::TEntityInfo myEntityInfo;
21   };
22   typedef shared_ptr<TMEDMesh> PMEDMesh;
23
24   struct TMEDMeshOnEntity: TMeshOnEntityImpl{
25     MED::TGeom myGeom;
26   };
27   typedef shared_ptr<TMEDMeshOnEntity> PMEDMeshOnEntity;
28
29   struct TMEDFamily: TFamilyImpl{
30   };
31   typedef shared_ptr<TMEDFamily> PMEDFamily;
32   
33   struct TMEDGroup: TGroupImpl{
34   };
35   typedef shared_ptr<TMEDGroup> PMEDGroup;
36
37   struct TMEDField: TFieldImpl{
38   };
39   typedef shared_ptr<TMEDField> PMEDField;
40
41   struct TMEDValForTime: TValForTimeImpl{
42   };
43   typedef shared_ptr<TMEDValForTime> PMEDValForTime;
44
45 }
46
47 class VISU_MedConvertor: public VISU_Convertor_impl{
48   VISU_MedConvertor();
49   VISU_MedConvertor(const VISU_MedConvertor&);
50 public:
51   VISU_MedConvertor(const std::string& theFileName) ;
52   virtual VISU_Convertor* Build() ;
53 protected:
54   QFileInfo myFileInfo;
55
56   virtual int LoadMeshOnEntity(VISU::PMeshOnEntityImpl theMeshOnEntity, 
57                                const std::string& theFamilyName = "");
58
59   virtual int LoadMeshOnGroup(VISU::PMeshImpl theMesh, 
60                               const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet);
61
62   virtual int LoadFieldOnMesh(VISU::PMeshImpl theMesh, 
63                               VISU::PMeshOnEntityImpl theMeshOnEntity, 
64                               VISU::PFieldImpl theField, 
65                               VISU::PValForTimeImpl theValForTime);
66   
67   int LoadPoints(const MED::PWrapper& theMed,
68                  VISU::PMEDMesh theMesh, 
69                  const std::string& theFamilyName = "");
70
71   int LoadCellsOnEntity(const MED::PWrapper& theMed,
72                         VISU::PMEDMesh theMesh,
73                         VISU::PMEDMeshOnEntity theMeshOnEntity,
74                         const std::string& theFamilyName = "");
75   
76   int LoadField(const MED::PWrapper& theMed,
77                 VISU::PMEDMesh theMesh,
78                 VISU::PMEDMeshOnEntity theMeshOnEntity,
79                 VISU::PMEDField theField, 
80                 VISU::PMEDValForTime theValForTime);
81   
82 };
83
84 #endif