1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : VISU_CorbaMedConvertor.hxx
25 // Author : Alexey PETROV
28 // Copyright (C) 2003 CEA/DEN, EDF R&D
30 #ifndef VISU_CorbaMedConvertor_HeaderFile
31 #define VISU_CorbaMedConvertor_HeaderFile
33 #include "VISUConfig.hh"
34 #include "VISU_Convertor_impl.hxx"
40 struct TCMesh: TMeshImpl{
41 SALOME_MED::MESH_var myMesh;
43 typedef shared_ptr<TCMesh> PCMesh;
45 struct TCMeshOnEntity: TMeshOnEntityImpl{
46 SALOME_MED::SUPPORT_var mySupport;
47 typedef std::pair<int,int> TIndexAndSize;
48 typedef std::map<int,TIndexAndSize> TCellsFirstIndex;
49 TCellsFirstIndex myCellsFirstIndex;
51 typedef shared_ptr<TCMeshOnEntity> PCMeshOnEntity;
53 struct TCFamily: TFamilyImpl{
54 SALOME_MED::FAMILY_var myFamily;
56 typedef shared_ptr<TCFamily> PCFamily;
58 struct TCGroup: TGroupImpl{
59 SALOME_MED::GROUP_var myGroup;
61 typedef shared_ptr<TCGroup> PCGroup;
63 struct TCField: TFieldImpl{
65 typedef shared_ptr<TCField> PCField;
67 struct TCValForTime: TValForTimeImpl{
68 SALOME_MED::FIELD_var myField;
70 typedef shared_ptr<TCValForTime> PCValForTime;
75 class VISU_MEDConvertor: public VISU_Convertor_impl{
77 SALOMEDS::SObject_var mySObject;
78 VISU_MEDConvertor() {};
81 VISU_MEDConvertor(SALOMEDS::SObject_ptr theMedSObject) : mySObject(SALOMEDS::SObject::_duplicate(theMedSObject)) {}
82 virtual VISU_Convertor* Build();
86 VISU_Convertor* Build(SALOME_MED::MED_ptr theMED);
87 VISU_Convertor* Build(SALOMEDS::ChildIterator_ptr theTimeStampIterator);
89 virtual int LoadMeshOnEntity(VISU::PMeshOnEntityImpl theMeshOnEntity,
90 const std::string& theFamilyName = "");
92 virtual int LoadMeshOnGroup(VISU::PMeshImpl theMesh,
93 const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet);
95 virtual int LoadFieldOnMesh(VISU::PMeshImpl theMesh,
96 VISU::PMeshOnEntityImpl theMeshOnEntity,
97 VISU::PFieldImpl theField,
98 VISU::PValForTimeImpl theValForTime);
100 int LoadPoints(VISU::PCMesh theMesh,
101 const std::string& theFamilyName = "") ;
103 int LoadCellsOnEntity(VISU::PCMesh theMesh,
104 VISU::PCMeshOnEntity theMeshOnEntity,
105 const std::string& theFamilyName = "");
107 int LoadField(VISU::PCMesh theMesh,
108 VISU::PCMeshOnEntity theMeshOnEntity,
109 VISU::PField theField,
110 VISU::PCValForTime theValForTime);
114 class VISU_MEDFieldConvertor: public VISU_MEDConvertor{
116 SALOME_MED::FIELD_var myField;
118 VISU_MEDFieldConvertor(SALOME_MED::FIELD_ptr theField) :
119 myField(SALOME_MED::FIELD::_duplicate(theField))
121 virtual VISU_Convertor* Build() ;
125 VISU_Convertor* CreateMEDConvertor(SALOMEDS::SObject_ptr theMedSObject) ;
126 VISU_Convertor* CreateMEDFieldConvertor(SALOME_MED::FIELD_ptr theField) ;