X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FSwig%2FMEDLoaderCommon.i;h=ab758d651954dfeac509cfce2eeea2b3ba80affc;hb=4baccec0014292a4a7da71839d9088c6ef970d31;hp=7003e67524efa63d732ef32adf1abc141fdb3a5d;hpb=d9a5b827a03e5f4d665ff6a1f8394f3cd71e16ad;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/Swig/MEDLoaderCommon.i b/src/MEDLoader/Swig/MEDLoaderCommon.i index 7003e6752..ab758d651 100644 --- a/src/MEDLoader/Swig/MEDLoaderCommon.i +++ b/src/MEDLoader/Swig/MEDLoaderCommon.i @@ -31,6 +31,7 @@ #include "MEDFileField.hxx" #include "MEDFileParameter.hxx" #include "MEDFileData.hxx" +#include "MEDFileMeshReadSelector.hxx" #include "MEDLoaderTypemaps.i" #include "SauvReader.hxx" #include "SauvWriter.hxx" @@ -132,8 +133,10 @@ using namespace ParaMEDMEM; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldOnMeshAtLevel; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldAtLevelOld; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getUndergroundDataArray; +%newobject ParaMEDMEM::MEDFileFieldMultiTS::convertToInt; %newobject ParaMEDMEM::MEDFileIntFieldMultiTS::New; %newobject ParaMEDMEM::MEDFileIntFieldMultiTS::getUndergroundDataArray; +%newobject ParaMEDMEM::MEDFileIntFieldMultiTS::convertToDouble; %newobject ParaMEDMEM::MEDFileAnyTypeField1TS::New; %newobject ParaMEDMEM::MEDFileAnyTypeField1TS::shallowCpy; @@ -144,8 +147,10 @@ using namespace ParaMEDMEM; %newobject ParaMEDMEM::MEDFileField1TS::getFieldOnMeshAtLevel; %newobject ParaMEDMEM::MEDFileField1TS::getFieldAtLevelOld; %newobject ParaMEDMEM::MEDFileField1TS::getUndergroundDataArray; +%newobject ParaMEDMEM::MEDFileField1TS::convertToInt; %newobject ParaMEDMEM::MEDFileIntField1TS::New; %newobject ParaMEDMEM::MEDFileIntField1TS::getUndergroundDataArray; +%newobject ParaMEDMEM::MEDFileIntField1TS::convertToDouble; %newobject ParaMEDMEM::MEDFileData::New; %newobject ParaMEDMEM::MEDFileData::deepCpy; @@ -386,11 +391,47 @@ namespace ParaMEDMEM void setZipConnPolicy(int newVal) throw(INTERP_KERNEL::Exception); }; + class MEDFileMeshReadSelector + { + public: + MEDFileMeshReadSelector(); + MEDFileMeshReadSelector(unsigned int code); + unsigned int getCode() const; + void setCode(unsigned int newCode); + bool isCellFamilyFieldReading() const; + bool isNodeFamilyFieldReading() const; + bool isCellNameFieldReading() const; + bool isNodeNameFieldReading() const; + bool isCellNumFieldReading() const; + bool isNodeNumFieldReading() const; + void setCellFamilyFieldReading(bool b); + void setNodeFamilyFieldReading(bool b); + void setCellNameFieldReading(bool b); + void setNodeNameFieldReading(bool b); + void setCellNumFieldReading(bool b); + void setNodeNumFieldReading(bool b); + %extend + { + std::string __str__() const throw(INTERP_KERNEL::Exception) + { + std::ostringstream oss; + self->reprAll(oss); + return oss.str(); + } + + std::string __repr__() const throw(INTERP_KERNEL::Exception) + { + std::ostringstream oss; oss << "MEDFileMeshReadSelector C++ instance at " << self << " (with code=" << self->getCode() << ")."; + return oss.str(); + } + } + }; + class MEDFileMesh : public RefCountObject, public MEDFileWritable { public: - static MEDFileMesh *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception); + static MEDFileMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); + static MEDFileMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); virtual MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception); virtual MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception); virtual MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception); @@ -488,16 +529,6 @@ namespace ParaMEDMEM virtual DataArrayInt *getNodeFamiliesArr(const std::vector& fams, bool renum=false) const throw(INTERP_KERNEL::Exception); %extend { - MEDFileMesh(const char *fileName) throw(INTERP_KERNEL::Exception) - { - return MEDFileMesh::New(fileName); - } - - MEDFileMesh(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception) - { - return MEDFileMesh::New(fileName,mName,dt,it); - } - std::string __str__() const throw(INTERP_KERNEL::Exception) { return self->simpleRepr(); @@ -623,8 +654,8 @@ namespace ParaMEDMEM class MEDFileUMesh : public MEDFileMesh { public: - static MEDFileUMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception); - static MEDFileUMesh *New(const char *fileName) throw(INTERP_KERNEL::Exception); + static MEDFileUMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); + static MEDFileUMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); static MEDFileUMesh *New(); ~MEDFileUMesh(); int getSpaceDimension() const throw(INTERP_KERNEL::Exception); @@ -667,14 +698,14 @@ namespace ParaMEDMEM DataArrayInt *zipCoords() throw(INTERP_KERNEL::Exception); %extend { - MEDFileUMesh(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception) + MEDFileUMesh(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception) { - return MEDFileUMesh::New(fileName,mName,dt,it); + return MEDFileUMesh::New(fileName,mName,dt,it,mrs); } - MEDFileUMesh(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileUMesh(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception) { - return MEDFileUMesh::New(fileName); + return MEDFileUMesh::New(fileName,mrs); } MEDFileUMesh() @@ -747,8 +778,8 @@ namespace ParaMEDMEM { public: static MEDFileCMesh *New(); - static MEDFileCMesh *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileCMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception); + static MEDFileCMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); + static MEDFileCMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); void setMesh(MEDCouplingCMesh *m) throw(INTERP_KERNEL::Exception); %extend { @@ -757,14 +788,14 @@ namespace ParaMEDMEM return MEDFileCMesh::New(); } - MEDFileCMesh(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileCMesh(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception) { - return MEDFileCMesh::New(fileName); + return MEDFileCMesh::New(fileName,mrs); } - MEDFileCMesh(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception) + MEDFileCMesh(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception) { - return MEDFileCMesh::New(fileName,mName,dt,it); + return MEDFileCMesh::New(fileName,mName,dt,it,mrs); } PyObject *getMesh() const throw(INTERP_KERNEL::Exception) @@ -781,8 +812,8 @@ namespace ParaMEDMEM { public: static MEDFileCurveLinearMesh *New(); - static MEDFileCurveLinearMesh *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileCurveLinearMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception); + static MEDFileCurveLinearMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); + static MEDFileCurveLinearMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception); void setMesh(MEDCouplingCurveLinearMesh *m) throw(INTERP_KERNEL::Exception); %extend { @@ -791,14 +822,14 @@ namespace ParaMEDMEM return MEDFileCurveLinearMesh::New(); } - MEDFileCurveLinearMesh(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileCurveLinearMesh(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception) { - return MEDFileCurveLinearMesh::New(fileName); + return MEDFileCurveLinearMesh::New(fileName,mrs); } - MEDFileCurveLinearMesh(const char *fileName, const char *mName, int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception) + MEDFileCurveLinearMesh(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception) { - return MEDFileCurveLinearMesh::New(fileName,mName,dt,it); + return MEDFileCurveLinearMesh::New(fileName,mName,dt,it,mrs); } PyObject *getMesh() const throw(INTERP_KERNEL::Exception) @@ -1098,10 +1129,13 @@ namespace ParaMEDMEM class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritable { public: - static MEDFileAnyTypeField1TS *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); - static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception); + static MEDFileAnyTypeField1TS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileAnyTypeField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception); void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); + void loadArrays() throw(INTERP_KERNEL::Exception); + void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); + void releaseArrays() throw(INTERP_KERNEL::Exception); int getDimension() const throw(INTERP_KERNEL::Exception); int getIteration() const throw(INTERP_KERNEL::Exception); int getOrder() const throw(INTERP_KERNEL::Exception); @@ -1225,10 +1259,11 @@ namespace ParaMEDMEM class MEDFileField1TS : public MEDFileAnyTypeField1TS { public: - static MEDFileField1TS *New(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception); - static MEDFileField1TS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); - static MEDFileField1TS *New(const char *fileName) throw(INTERP_KERNEL::Exception); + static MEDFileField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileField1TS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception); static MEDFileField1TS *New(); + ParaMEDMEM::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, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception); @@ -1241,19 +1276,19 @@ namespace ParaMEDMEM void setLocNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception); %extend { - MEDFileField1TS(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileField1TS(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileField1TS::New(fileName); + return MEDFileField1TS::New(fileName,loadAll); } - MEDFileField1TS(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception) + MEDFileField1TS(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileField1TS::New(fileName,fieldName); + return MEDFileField1TS::New(fileName,fieldName,loadAll); } - MEDFileField1TS(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception) + MEDFileField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileField1TS::New(fileName,fieldName,iteration,order); + return MEDFileField1TS::New(fileName,fieldName,iteration,order,loadAll); } MEDFileField1TS() @@ -1359,9 +1394,10 @@ namespace ParaMEDMEM { public: static MEDFileIntField1TS *New(); - static MEDFileIntField1TS *New(const char *fileName) throw(INTERP_KERNEL::Exception); - 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 char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileIntField1TS *New(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception); + ParaMEDMEM::MEDFileField1TS *convertToDouble(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception); // void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception); void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception); @@ -1372,19 +1408,19 @@ namespace ParaMEDMEM return MEDFileIntField1TS::New(); } - MEDFileIntField1TS(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileIntField1TS(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileIntField1TS::New(fileName); + return MEDFileIntField1TS::New(fileName,loadAll); } - MEDFileIntField1TS(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception) + MEDFileIntField1TS(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileIntField1TS::New(fileName,fieldName); + return MEDFileIntField1TS::New(fileName,fieldName,loadAll); } - MEDFileIntField1TS(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception) + MEDFileIntField1TS(const char *fileName, const char *fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileIntField1TS::New(fileName,fieldName,iteration,order); + return MEDFileIntField1TS::New(fileName,fieldName,iteration,order,loadAll); } std::string __str__() const throw(INTERP_KERNEL::Exception) @@ -1484,8 +1520,8 @@ namespace ParaMEDMEM class MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritable { public: - static MEDFileAnyTypeFieldMultiTS *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); + static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileAnyTypeFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception); MEDFileAnyTypeFieldMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception); virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const throw(INTERP_KERNEL::Exception); std::string getName() const throw(INTERP_KERNEL::Exception); @@ -1501,6 +1537,9 @@ namespace ParaMEDMEM int getPosOfTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception); int getPosGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception); void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); + void loadArrays() throw(INTERP_KERNEL::Exception); + void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); + void releaseArrays() throw(INTERP_KERNEL::Exception); // virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception); MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception); @@ -1775,8 +1814,8 @@ namespace ParaMEDMEM { public: static MEDFileFieldMultiTS *New() throw(INTERP_KERNEL::Exception); - static MEDFileFieldMultiTS *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileFieldMultiTS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); + static MEDFileFieldMultiTS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception); // MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception); MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const throw(INTERP_KERNEL::Exception); @@ -1786,6 +1825,7 @@ namespace ParaMEDMEM // void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception); void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception); + ParaMEDMEM::MEDFileIntFieldMultiTS *convertToInt(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception); %extend { MEDFileFieldMultiTS() @@ -1793,14 +1833,14 @@ namespace ParaMEDMEM return MEDFileFieldMultiTS::New(); } - MEDFileFieldMultiTS(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileFieldMultiTS(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileFieldMultiTS::New(fileName); + return MEDFileFieldMultiTS::New(fileName,loadAll); } - MEDFileFieldMultiTS(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception) + MEDFileFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileFieldMultiTS::New(fileName,fieldName); + return MEDFileFieldMultiTS::New(fileName,fieldName,loadAll); } std::string __str__() const throw(INTERP_KERNEL::Exception) @@ -1911,11 +1951,12 @@ namespace ParaMEDMEM { public: static MEDFileIntFieldMultiTS *New(); - static MEDFileIntFieldMultiTS *New(const char *fileName) throw(INTERP_KERNEL::Exception); - static MEDFileIntFieldMultiTS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception); + static MEDFileIntFieldMultiTS *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception); + static MEDFileIntFieldMultiTS *New(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception); // void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception); void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception); + ParaMEDMEM::MEDFileFieldMultiTS *convertToDouble(bool deepCpyGlobs=true) const throw(INTERP_KERNEL::Exception); %extend { MEDFileIntFieldMultiTS() @@ -1923,14 +1964,14 @@ namespace ParaMEDMEM return MEDFileIntFieldMultiTS::New(); } - MEDFileIntFieldMultiTS(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileIntFieldMultiTS(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileIntFieldMultiTS::New(fileName); + return MEDFileIntFieldMultiTS::New(fileName,loadAll); } - MEDFileIntFieldMultiTS(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception) + MEDFileIntFieldMultiTS(const char *fileName, const char *fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileIntFieldMultiTS::New(fileName,fieldName); + return MEDFileIntFieldMultiTS::New(fileName,fieldName,loadAll); } std::string __str__() const throw(INTERP_KERNEL::Exception) @@ -2012,9 +2053,12 @@ namespace ParaMEDMEM { public: static MEDFileFields *New() throw(INTERP_KERNEL::Exception); - static MEDFileFields *New(const char *fileName) throw(INTERP_KERNEL::Exception); + static MEDFileFields *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception); MEDFileFields *deepCpy() const throw(INTERP_KERNEL::Exception); MEDFileFields *shallowCpy() const throw(INTERP_KERNEL::Exception); + void loadArrays() throw(INTERP_KERNEL::Exception); + void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception); + void releaseArrays() throw(INTERP_KERNEL::Exception); void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception); int getNumberOfFields() const; std::vector getFieldsNames() const throw(INTERP_KERNEL::Exception); @@ -2035,9 +2079,9 @@ namespace ParaMEDMEM return MEDFileFields::New(); } - MEDFileFields(const char *fileName) throw(INTERP_KERNEL::Exception) + MEDFileFields(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception) { - return MEDFileFields::New(fileName); + return MEDFileFields::New(fileName,loadAll); } std::string __str__() const throw(INTERP_KERNEL::Exception)