]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
NRI : Merge from V1_2.
authornri <nri@opencascade.com>
Thu, 10 Jul 2003 15:34:20 +0000 (15:34 +0000)
committernri <nri@opencascade.com>
Thu, 10 Jul 2003 15:34:20 +0000 (15:34 +0000)
src/VISU_I/VISU_CorbaMedConvertor.hxx

index 138813057d1d33e89b88936848c604b30ba8867f..312180c99b891a30ed297f519676c84eee61d943 100644 (file)
@@ -17,111 +17,44 @@ extern "C"{
 }  
 
 
-class VISU_MEDConvertor: public VISU_Convertor_impl{
- protected:
-  /*
+namespace VISUMED{
   struct TFamily{
     SALOME_MED::FAMILY_var myFamily;
-    int myId;
-    string myName;
-    VISU::TEntity myEntity;
-    TBindGroups myGroups;
-    TSubMesh mySubMesh;
   };
   typedef std::map<std::string,TFamily> TFamilyMap;
-
+  
   struct TField{
-    SALOME_MED::FIELD_var myField;
-    int myId;
-    string myName;
-    VISU::TEntity myEntity;
-    string myMeshName;
-    int myNbComp;
-    typedef std::pair<double,std::string> TTime;
     struct TValForTime{
-      int myId;
-      TTime myTime;
+      SALOME_MED::FIELD_var myField;
     };
     typedef std::map<int,TValForTime> TValField;
     TValField myValField;
-    void ShallowCopy(const TField& aField);
   };
   typedef map<string,TField> TFieldMap;
 
   struct TMeshOnEntity{
     SALOME_MED::SUPPORT_var mySupport;
-    string myMeshName;
-    VISU::TEntity myEntity;
+    typedef pair<int,int> TIndexAndSize;
+    typedef map<int,TIndexAndSize> TCellsFirstIndex;
+    TCellsFirstIndex myCellsFirstIndex;
     TFamilyMap myFamilyMap;
     TFieldMap myFieldMap;
   };
-  typedef std::map<TEntity,TMeshOnEntity> TMeshOnEntityMap;
-  const TFamily* GetFamily(const VISU::TMeshOnEntity& theMeshOnEntity, 
-                    const string& theFamilyName)
-    throw(std::runtime_error&); 
-  TFamily* GetFamily(VISU::TMeshOnEntity& theMeshOnEntity, 
-                    const string& theFamilyName)
-    throw(std::runtime_error&); 
-
-  typedef std::pair<std::string,TEntity> TFamilyAndEntity;
-  typedef std::set<TFamilyAndEntity> TFamilyAndEntitySet;
+  typedef std::map<VISU::TEntity,TMeshOnEntity> TMeshOnEntityMap;
+  
   struct TGroup{
-    TVTKReader myStorage;
-    string myName;
-    string myMeshName;
-    TFamilyAndEntitySet myFamilyAndEntitySet;
+    SALOME_MED::GROUP_var myGroup;
   };
   typedef std::map<std::string,TGroup> TGroupMap;
 
   struct TMesh{
-    int myDim;
-    string myName;
-    typedef vector<float> TPointsCoord;
-    TPointsCoord myPointsCoord;
+    SALOME_MED::MESH_var myMesh;
     TMeshOnEntityMap myMeshOnEntityMap;
     TGroupMap myGroupMap;
-    void CreateMeshOnNodes();
-    const TField* GetField(const string& theFieldName) const;
   };
   typedef std::map<std::string,TMesh> TMeshMap;
-  */
-  SALOMEDS::SObject_var mySObject;
- public:
-  void SetMedField(SALOME_MED::FIELD_ptr theMedField);
-  virtual VISU_Convertor* Build() throw (std::runtime_error&);
- protected:
-  virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity, 
-                              const string& theFamilyName = "")
-    throw (std::runtime_error&) {return 1;}
-  virtual int LoadMeshOnGroup(VISU::TMesh& theMesh, 
-                             const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
-    throw (std::runtime_error&) {return 1;}
-  virtual int LoadFieldOnMesh(VISU::TMesh& theMesh, 
-                             VISU::TMeshOnEntity& theMeshOnEntity, 
-                             VISU::TField& theField, 
-                             VISU::TField::TValForTime& theValForTime)
-    throw (std::runtime_error&) {return 1;}
-};
+}
 
-class VISU_MedMeshConvertor: public VISU_Convertor_impl{
-protected:
-  SALOME_MED::MESH_var myMedMesh;
-public:
-  void SetMedMesh(SALOME_MED::MESH_ptr theMedMesh);
-  virtual VISU_Convertor* Build() throw (std::runtime_error&);
- protected:
-  virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity, 
-                              const string& theFamilyName = "")
-    throw (std::runtime_error&) {return 1;}
-  virtual int LoadMeshOnGroup(VISU::TMesh& theMesh, 
-                             const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
-    throw (std::runtime_error&) {return 1;}
-  virtual int LoadFieldOnMesh(VISU::TMesh& theMesh, 
-                             VISU::TMeshOnEntity& theMeshOnEntity, 
-                             VISU::TField& theField, 
-                             VISU::TField::TValForTime& theValForTime)
-    throw (std::runtime_error&) {return 1;}
-};
 
 class VISU_MEDConvertor: public VISU_Convertor_impl{
  protected:
@@ -134,15 +67,22 @@ class VISU_MEDConvertor: public VISU_Convertor_impl{
  protected:
   virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity, 
                               const string& theFamilyName = "")
-    throw (std::runtime_error&) {return 1;}
+    throw (std::runtime_error&);
   virtual int LoadMeshOnGroup(VISU::TMesh& theMesh, 
                              const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
-    throw (std::runtime_error&) {return 1;}
+    throw (std::runtime_error&);
   virtual int LoadFieldOnMesh(VISU::TMesh& theMesh, 
                              VISU::TMeshOnEntity& theMeshOnEntity, 
                              VISU::TField& theField, 
                              VISU::TField::TValForTime& theValForTime)
-    throw (std::runtime_error&) {return 1;}
+    throw (std::runtime_error&);
+  int LoadPoints(VISU::TMesh& theMesh, const string& theFamilyName = "") 
+    throw (std::runtime_error&);
+  int LoadCellsOnEntity(VISU::TMeshOnEntity& theMeshOnEntity, const string& theFamilyName = "")
+    throw (std::runtime_error&);
+  int LoadField(const VISU::TMeshOnEntity& theMeshOnEntity,
+               const VISU::TField& theField, VISU::TField::TValForTime& theValForTime)
+    throw (std::runtime_error&);
 };
 
 class VISU_MEDFieldConvertor: public VISU_MEDConvertor{