From 52940d840bcaf6a5b3f44c1879999db951c51a0a Mon Sep 17 00:00:00 2001 From: nri Date: Thu, 10 Jul 2003 15:34:20 +0000 Subject: [PATCH] NRI : Merge from V1_2. --- src/VISU_I/VISU_CorbaMedConvertor.hxx | 102 ++++++-------------------- 1 file changed, 21 insertions(+), 81 deletions(-) diff --git a/src/VISU_I/VISU_CorbaMedConvertor.hxx b/src/VISU_I/VISU_CorbaMedConvertor.hxx index 13881305..312180c9 100644 --- a/src/VISU_I/VISU_CorbaMedConvertor.hxx +++ b/src/VISU_I/VISU_CorbaMedConvertor.hxx @@ -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 TFamilyMap; - + struct TField{ - SALOME_MED::FIELD_var myField; - int myId; - string myName; - VISU::TEntity myEntity; - string myMeshName; - int myNbComp; - typedef std::pair TTime; struct TValForTime{ - int myId; - TTime myTime; + SALOME_MED::FIELD_var myField; }; typedef std::map TValField; TValField myValField; - void ShallowCopy(const TField& aField); }; typedef map TFieldMap; struct TMeshOnEntity{ SALOME_MED::SUPPORT_var mySupport; - string myMeshName; - VISU::TEntity myEntity; + typedef pair TIndexAndSize; + typedef map TCellsFirstIndex; + TCellsFirstIndex myCellsFirstIndex; TFamilyMap myFamilyMap; TFieldMap myFieldMap; }; - typedef std::map 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 TFamilyAndEntity; - typedef std::set TFamilyAndEntitySet; + typedef std::map TMeshOnEntityMap; + struct TGroup{ - TVTKReader myStorage; - string myName; - string myMeshName; - TFamilyAndEntitySet myFamilyAndEntitySet; + SALOME_MED::GROUP_var myGroup; }; typedef std::map TGroupMap; struct TMesh{ - int myDim; - string myName; - typedef vector TPointsCoord; - TPointsCoord myPointsCoord; + SALOME_MED::MESH_var myMesh; TMeshOnEntityMap myMeshOnEntityMap; TGroupMap myGroupMap; - void CreateMeshOnNodes(); - const TField* GetField(const string& theFieldName) const; }; typedef std::map 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{ -- 2.39.2