X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileField.hxx;h=dcb0253aa2aa523973bd752f41ebcdb634f77c0b;hb=706d60360e52537b49884c3f5a2d14e7ac27eba3;hp=fdf54072fdbb06643bd8b58b4ea5dfac3a798aef;hpb=bca5c47920fb74013c9bf1a576235934861ab6ae;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index fdf54072f..dcb0253aa 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -478,6 +478,7 @@ namespace ParaMEDMEM // MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) throw(INTERP_KERNEL::Exception); const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const throw(INTERP_KERNEL::Exception); + void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other) throw(INTERP_KERNEL::Exception); public: int getNumberOfComponents() const; const std::vector& getInfo() const; @@ -521,6 +522,8 @@ namespace ParaMEDMEM //! only useable on reading mutable int _csit; }; + + class MEDFileIntField1TSWithoutSDA; /*! * SDA is for Shared Data Arrays such as profiles. @@ -548,6 +551,7 @@ namespace ParaMEDMEM const DataArray *getOrCreateAndGetArray() const; DataArrayDouble *getOrCreateAndGetArrayDouble(); const DataArrayDouble *getOrCreateAndGetArrayDouble() const; + MEDFileIntField1TSWithoutSDA *convertToInt() const throw(INTERP_KERNEL::Exception); protected: MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > _arr; public: @@ -575,6 +579,7 @@ namespace ParaMEDMEM const DataArrayInt *getOrCreateAndGetArrayInt() const; DataArrayInt *getUndergroundDataArrayInt() const throw(INTERP_KERNEL::Exception); DataArrayInt *getUndergroundDataArrayIntExt(std::vector< std::pair,std::pair > >& entries) const throw(INTERP_KERNEL::Exception); + MEDFileField1TSWithoutSDA *convertToDouble() const throw(INTERP_KERNEL::Exception); protected: MEDFileIntField1TSWithoutSDA(const char *fieldName, int csit, int iteration, int order, const std::vector& infos); protected: @@ -659,10 +664,13 @@ namespace ParaMEDMEM virtual med_field_type getMEDFileFieldType() const = 0; MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() throw(INTERP_KERNEL::Exception); const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const throw(INTERP_KERNEL::Exception); + //void setContent(MEDCouplingAutoRefCountObjectPtr newc); tony protected: MEDCouplingAutoRefCountObjectPtr _content; }; - + + class MEDFileIntField1TS; + /*! * User class. */ @@ -674,6 +682,8 @@ namespace ParaMEDMEM static MEDFileField1TS *New(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception); static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent); static MEDFileField1TS *New(); + MEDFileIntField1TS *convertToInt(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception); + // MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception); MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception); MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception); @@ -714,6 +724,7 @@ namespace ParaMEDMEM static MEDFileIntField1TS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception); static MEDFileIntField1TS *New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent); + MEDFileField1TS *convertToDouble(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeField1TS *shallowCpy() const throw(INTERP_KERNEL::Exception); // MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, DataArrayInt* &arrOut, int renumPol=0) const throw(INTERP_KERNEL::Exception); @@ -809,6 +820,8 @@ namespace ParaMEDMEM std::vector< MEDCouplingAutoRefCountObjectPtr > _time_steps; }; + class MEDFileIntFieldMultiTSWithoutSDA; + class MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA { public: @@ -818,6 +831,7 @@ namespace ParaMEDMEM MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const throw(INTERP_KERNEL::Exception); std::vector< std::vector > getFieldSplitedByType2(int iteration, int order, const char *mname, std::vector& types, std::vector< std::vector >& typesF, std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const throw(INTERP_KERNEL::Exception); + MEDFileIntFieldMultiTSWithoutSDA *convertToInt() const throw(INTERP_KERNEL::Exception); protected: MEDFileFieldMultiTSWithoutSDA(const char *fieldName); MEDFileFieldMultiTSWithoutSDA(med_idt fid, const char *fieldName, med_field_type fieldTyp, const std::vector& infos, int nbOfStep, const std::string& dtunit) throw(INTERP_KERNEL::Exception); @@ -920,6 +934,8 @@ namespace ParaMEDMEM MEDCouplingAutoRefCountObjectPtr _content; }; + class MEDFileIntFieldMultiTS; + /*! * User class. */ @@ -932,6 +948,7 @@ namespace ParaMEDMEM static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent); MEDFileAnyTypeFieldMultiTS *shallowCpy() const throw(INTERP_KERNEL::Exception); void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const throw(INTERP_KERNEL::Exception); + MEDFileIntFieldMultiTS *convertToInt(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception); // MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);