X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FMEDLoader%2FMEDFileStructureElement.hxx;h=64e1025c2f634fac18c881da3557679c8dc724ea;hb=5ea9370443568d9dd6c42c970cbc24c1b6ae6c28;hp=5d9b2ea020c80dbb08ade2c107419ab7eeaf1709;hpb=4074002279f1ca79b31bcd1465f19a19a98f73ac;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileStructureElement.hxx b/src/MEDLoader/MEDFileStructureElement.hxx index 5d9b2ea02..64e1025c2 100644 --- a/src/MEDLoader/MEDFileStructureElement.hxx +++ b/src/MEDLoader/MEDFileStructureElement.hxx @@ -30,12 +30,16 @@ namespace MEDCoupling { class MEDFileStructureElement; + class MEDFileMeshSupports; + class MEDFileUMesh; class MEDFileSEHolder { + public: + std::string getModelName() const; + std::string getName() const; protected: MEDFileSEHolder(MEDFileStructureElement *father):_father(father) { } - std::string getModelName() const; void setName(const std::string& name); std::size_t getHeapMemorySizeLoc() const; private: @@ -46,7 +50,7 @@ namespace MEDCoupling class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileSEHolder { public: - static MEDFileSEConstAtt *New(med_idt fid, MEDFileStructureElement *father, int idCstAtt); + static MEDFileSEConstAtt *New(med_idt fid, MEDFileStructureElement *father, int idCstAtt, const MEDFileUMesh *mesh); public: std::vector getDirectChildrenWithNull() const; std::size_t getHeapMemorySizeWithoutChildren() const; @@ -54,7 +58,7 @@ class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlon void setProfile(const std::string& name); std::string getProfile() const; private: - MEDFileSEConstAtt(med_idt fid, MEDFileStructureElement *father, int idCstAtt); + MEDFileSEConstAtt(med_idt fid, MEDFileStructureElement *father, int idCstAtt, const MEDFileUMesh *mesh); private: std::string _pfl; TypeOfField _tof; @@ -69,6 +73,8 @@ class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlon std::vector getDirectChildrenWithNull() const; std::size_t getHeapMemorySizeWithoutChildren() const; void writeLL(med_idt fid) const; + int getNbOfComponents() const { return _nb_compo; } + MCAuto getGenerator() const { return _gen; } private: MEDFileSEVarAtt(med_idt fid, MEDFileStructureElement *father, int idVarAtt); private: @@ -79,8 +85,13 @@ class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlon class MEDFileStructureElement : public RefCountObject, public MEDFileWritableStandAlone { public: - MEDLOADER_EXPORT static MEDFileStructureElement *New(med_idt fid, int idSE); + MEDLOADER_EXPORT static MEDFileStructureElement *New(med_idt fid, int idSE, const MEDFileMeshSupports *ms); MEDLOADER_EXPORT std::string getName() const; + MEDLOADER_EXPORT int getDynGT() const; + MEDLOADER_EXPORT TypeOfField getEntity() const; + MEDLOADER_EXPORT std::string getMeshName() const; + MEDLOADER_EXPORT std::vector getVarAtts() const; + MEDLOADER_EXPORT const MEDFileSEVarAtt *getVarAtt(const std::string& varName) const; public: std::vector getDirectChildrenWithNull() const; std::size_t getHeapMemorySizeWithoutChildren() const; @@ -89,11 +100,13 @@ class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlon static MCAuto BuildFrom(med_attribute_type mat); static int EffectiveNbCompo(med_attribute_type mat, int nbCompo); private: - MEDFileStructureElement(med_idt fid, int idSE); + MEDFileStructureElement(med_idt fid, int idSE, const MEDFileMeshSupports *ms); private: int _id_type; std::string _name; + std::string _sup_mesh_name; INTERP_KERNEL::NormalizedCellType _geo_type; + TypeOfField _tof; int _dim; std::vector< MCAuto > _cst_att; std::vector< MCAuto > _var_att; @@ -102,18 +115,28 @@ class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlon class MEDFileStructureElements : public RefCountObject, public MEDFileWritableStandAlone { public: - MEDLOADER_EXPORT static MEDFileStructureElements *New(med_idt fid); + MEDLOADER_EXPORT static MEDFileStructureElements *New(const std::string& fileName, const MEDFileMeshSupports *ms); + MEDLOADER_EXPORT static MEDFileStructureElements *New(med_idt fid, const MEDFileMeshSupports *ms); MEDLOADER_EXPORT static MEDFileStructureElements *New(); + MEDLOADER_EXPORT int getNumberOf() const; + MEDLOADER_EXPORT std::vector getDynGTAvail() const; + MEDLOADER_EXPORT const MEDFileStructureElement *getWithGT(int idGT) const; + MEDLOADER_EXPORT int getNumberOfNodesPerSE(const std::string& seName) const; + MEDLOADER_EXPORT const MEDFileStructureElement *getSEWithName(const std::string& seName) const; + MEDLOADER_EXPORT std::vector getVarAttsOf(const std::string& seName) const; + MEDLOADER_EXPORT const MEDFileSEVarAtt *getVarAttOf(const std::string &seName, const std::string& varName) const; + MEDLOADER_EXPORT const MEDFileUMesh *getSupMeshWithName(const std::string& name) const; public: std::vector getDirectChildrenWithNull() const; std::size_t getHeapMemorySizeWithoutChildren() const; void writeLL(med_idt fid) const; private: - MEDFileStructureElements(med_idt fid); + MEDFileStructureElements(med_idt fid, const MEDFileMeshSupports *ms); MEDFileStructureElements(); ~MEDFileStructureElements(); private: std::vector< MCAuto > _elems; + MCConstAuto _sup; }; }