1 // File: VISU_CorbaMedConvertor.hxx
2 // Created: Fri Jan 10 12:02:49 2003
3 // Author: Alexey PETROV
4 // <apo@ivanox.nnov.matra-dtv.fr>
7 #ifndef VISU_CorbaMedConvertor_HeaderFile
8 #define VISU_CorbaMedConvertor_HeaderFile
10 #include "VISUConfig.hh"
11 #include "VISU_Convertor_impl.hxx"
18 class VISU_MEDConvertor: public VISU_Convertor_impl{
22 SALOME_MED::FAMILY_var myFamily;
25 VISU::TEntity myEntity;
29 typedef std::map<std::string,TFamily> TFamilyMap;
32 SALOME_MED::FIELD_var myField;
35 VISU::TEntity myEntity;
38 typedef std::pair<double,std::string> TTime;
43 typedef std::map<int,TValForTime> TValField;
45 void ShallowCopy(const TField& aField);
47 typedef map<string,TField> TFieldMap;
50 SALOME_MED::SUPPORT_var mySupport;
52 VISU::TEntity myEntity;
53 TFamilyMap myFamilyMap;
56 typedef std::map<TEntity,TMeshOnEntity> TMeshOnEntityMap;
57 const TFamily* GetFamily(const VISU::TMeshOnEntity& theMeshOnEntity,
58 const string& theFamilyName)
59 throw(std::runtime_error&);
60 TFamily* GetFamily(VISU::TMeshOnEntity& theMeshOnEntity,
61 const string& theFamilyName)
62 throw(std::runtime_error&);
64 typedef std::pair<std::string,TEntity> TFamilyAndEntity;
65 typedef std::set<TFamilyAndEntity> TFamilyAndEntitySet;
70 TFamilyAndEntitySet myFamilyAndEntitySet;
72 typedef std::map<std::string,TGroup> TGroupMap;
77 typedef vector<float> TPointsCoord;
78 TPointsCoord myPointsCoord;
79 TMeshOnEntityMap myMeshOnEntityMap;
81 void CreateMeshOnNodes();
82 const TField* GetField(const string& theFieldName) const;
84 typedef std::map<std::string,TMesh> TMeshMap;
86 SALOMEDS::SObject_var mySObject;
88 void SetMedField(SALOME_MED::FIELD_ptr theMedField);
89 virtual VISU_Convertor* Build() throw (std::runtime_error&);
91 virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity,
92 const string& theFamilyName = "")
93 throw (std::runtime_error&) {return 1;}
94 virtual int LoadMeshOnGroup(VISU::TMesh& theMesh,
95 const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
96 throw (std::runtime_error&) {return 1;}
97 virtual int LoadFieldOnMesh(VISU::TMesh& theMesh,
98 VISU::TMeshOnEntity& theMeshOnEntity,
99 VISU::TField& theField,
100 VISU::TField::TValForTime& theValForTime)
101 throw (std::runtime_error&) {return 1;}
104 class VISU_MedMeshConvertor: public VISU_Convertor_impl{
106 SALOME_MED::MESH_var myMedMesh;
108 void SetMedMesh(SALOME_MED::MESH_ptr theMedMesh);
109 virtual VISU_Convertor* Build() throw (std::runtime_error&);
111 virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity,
112 const string& theFamilyName = "")
113 throw (std::runtime_error&) {return 1;}
114 virtual int LoadMeshOnGroup(VISU::TMesh& theMesh,
115 const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
116 throw (std::runtime_error&) {return 1;}
117 virtual int LoadFieldOnMesh(VISU::TMesh& theMesh,
118 VISU::TMeshOnEntity& theMeshOnEntity,
119 VISU::TField& theField,
120 VISU::TField::TValForTime& theValForTime)
121 throw (std::runtime_error&) {return 1;}
124 class VISU_CorbaMedConvertor: public VISU_MedMeshConvertor{
126 SALOME_MED::FIELD_var myMedField;
128 void SetMedField(SALOME_MED::FIELD_ptr theMedField);
129 virtual VISU_Convertor* Build() throw (std::runtime_error&);
132 class VISU_CorbaMedSupportConvertor: public VISU_Convertor_impl{
134 SALOME_MED::SUPPORT_var mySupport;
135 SALOME_MED::MESH_var myMedMesh;
137 void SetSupport(SALOME_MED::SUPPORT_ptr theSupport);
138 virtual VISU_Convertor* Build() throw (std::runtime_error&);
140 virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity,
141 const string& theFamilyName = "")
142 throw (std::runtime_error&) {return 1;}
143 virtual int LoadMeshOnGroup(VISU::TMesh& theMesh,
144 const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
145 throw (std::runtime_error&) {return 1;}
146 virtual int LoadFieldOnMesh(VISU::TMesh& theMesh,
147 VISU::TMeshOnEntity& theMeshOnEntity,
148 VISU::TField& theField,
149 VISU::TField::TValForTime& theValForTime)
150 throw (std::runtime_error&) {return 1;}