#include "MEDFileUtilities.hxx"
#include "MEDFileSafeCaller.txx"
#include "MEDFileFieldOverView.hxx"
+#include "MEDFileUtilities.txx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldDiscretization.hxx"
throw e;
}
+MEDFileAnyTypeField1TS::MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileFieldGlobsReal(fileName)
+{
+ _content=BuildContentFrom(fid,fileName,loadAll,ms);//medfileexist
+ loadGlobals(fid);
+}
+catch(INTERP_KERNEL::Exception& e)
+{
+ throw e;
+}
+
MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms)
{
med_field_type typcha;
throw e;
}
+MEDFileAnyTypeField1TS::MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileFieldGlobsReal(fileName)
+{
+ _content=BuildContentFrom(fid,fileName,fieldName,loadAll,ms);//medfileexist
+ loadGlobals(fid);
+}
+catch(INTERP_KERNEL::Exception& e)
+{
+ throw e;
+}
+
MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const std::string& fileName)
{
if(!c)
{
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> c=BuildContentFrom(fid,fileName,loadAll,0);
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> ret=BuildNewInstanceFromContent(c,fileName);
+ return MEDFileAnyTypeField1TS::New(fid,fileName,loadAll);
+}
+
+MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(med_idt fid, const std::string& fileName, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> c=BuildContentFrom(fid,fileName,loadAll,0);//medfileexist
+ MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> ret=BuildNewInstanceFromContent(c,fileName);//medfileexist
ret->loadGlobals(fid);
return ret.retn();
}
{
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> c=BuildContentFrom(fid,fileName,fieldName,loadAll,0);
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> ret=BuildNewInstanceFromContent(c,fileName);
+ return MEDFileAnyTypeField1TS::New(fid,fileName,fieldName,loadAll);
+}
+
+MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> c=BuildContentFrom(fid,fileName,fieldName,loadAll,0);//medfileexist
+ MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> ret=BuildNewInstanceFromContent(c,fileName);//medfileexist
ret->loadGlobals(fid);
return ret.retn();
}
{
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> c=BuildContentFrom(fid,fileName,fieldName,iteration,order,loadAll,0);
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> ret=BuildNewInstanceFromContent(c,fileName);
+ return MEDFileAnyTypeField1TS::New(fid,fileName,fieldName,iteration,order,loadAll);
+}
+
+MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::New(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> c=BuildContentFrom(fid,fileName,fieldName,iteration,order,loadAll,0);//medfileexist
+ MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> ret=BuildNewInstanceFromContent(c,fileName);//medfileexist
ret->loadGlobals(fid);
return ret.retn();
}
throw e;
}
+MEDFileAnyTypeField1TS::MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileFieldGlobsReal(fileName)
+{
+ _content=BuildContentFrom(fid,fileName.c_str(),fieldName.c_str(),iteration,order,loadAll,ms);//medfileexist
+ loadGlobals(fid);
+}
+catch(INTERP_KERNEL::Exception& e)
+{
+ throw e;
+}
+
/*!
* This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
* If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
writeLL(fid);
}
+/*!
+ * \return DataArrayChar * - a newly allocated array to be deallocated by the caller.
+ */
+DataArrayByte *MEDFileAnyTypeField1TS::serialize() const
+{
+ return GoForSerialization(*this);
+}
+
/*!
* This method alloc the arrays and load potentially huge arrays contained in this field.
* This method should be called when a MEDFileAnyTypeField1TS::New constructor has been with false as the last parameter.
return ret.retn();
}
+MEDFileField1TS *MEDFileField1TS::New(med_idt fid, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ret(new MEDFileField1TS(fid,"",loadAll,0));//medfileexist
+ ret->contentNotNull();
+ return ret.retn();
+}
+
/*!
* Returns a new instance of MEDFileField1TS holding data of the first time step of
* a given field that has been read from a specified MED file.
return ret.retn();
}
+MEDFileField1TS *MEDFileField1TS::New(med_idt fid, const std::string& fieldName, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ret(new MEDFileField1TS(fid,"",fieldName,loadAll,0));//medfileexist
+ ret->contentNotNull();
+ return ret.retn();
+}
+
/*!
* Returns a new instance of MEDFileField1TS holding data of a given time step of
* a given field that has been read from a specified MED file.
return ret.retn();
}
+MEDFileField1TS *MEDFileField1TS::New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> ret(new MEDFileField1TS(fid,"",fieldName,iteration,order,loadAll,0));//medfileexist
+ ret->contentNotNull();
+ return ret.retn();
+}
+
/*!
* Returns a new instance of MEDFileField1TS. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
* If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileField1TS::MEDFileField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeField1TS(fid,fileName,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
MEDFileField1TS::MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms)
try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll,ms)
{
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileField1TS::MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
MEDFileField1TS::MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms)
try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll,ms)
{
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileField1TS::MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,iteration,order,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
/*!
* This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
* If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
return ret.retn();
}
+MEDFileIntField1TS *MEDFileIntField1TS::New(med_idt fid, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileIntField1TS> ret(new MEDFileIntField1TS(fid,"",loadAll,0));//medfileexist
+ ret->contentNotNull();
+ return ret.retn();
+}
+
MEDFileIntField1TS *MEDFileIntField1TS::New(const std::string& fileName, const std::string& fieldName, bool loadAll)
{
MEDCouplingAutoRefCountObjectPtr<MEDFileIntField1TS> ret(new MEDFileIntField1TS(fileName,fieldName,loadAll,0));
return ret.retn();
}
+MEDFileIntField1TS *MEDFileIntField1TS::New(med_idt fid, const std::string& fieldName, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileIntField1TS> ret(new MEDFileIntField1TS(fid,"",fieldName,loadAll,0));//medfileexist
+ ret->contentNotNull();
+ return ret.retn();
+}
+
MEDFileIntField1TS *MEDFileIntField1TS::New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll)
{
MEDCouplingAutoRefCountObjectPtr<MEDFileIntField1TS> ret(new MEDFileIntField1TS(fileName,fieldName,iteration,order,loadAll,0));
return ret.retn();
}
+MEDFileIntField1TS *MEDFileIntField1TS::New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileIntField1TS> ret(new MEDFileIntField1TS(fid,"",fieldName,iteration,order,loadAll,0));//medfileexist
+ ret->contentNotNull();
+ return ret.retn();
+}
+
MEDFileIntField1TS *MEDFileIntField1TS::New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent)
{
MEDCouplingAutoRefCountObjectPtr<MEDFileIntField1TS> ret=new MEDFileIntField1TS(other,shallowCopyOfContent);
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileIntField1TS::MEDFileIntField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeField1TS(fid,fileName,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
MEDFileIntField1TS::MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms)
try:MEDFileAnyTypeField1TS(fileName,fieldName,loadAll,ms)
{
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileIntField1TS::MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
MEDFileIntField1TS::MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms)
try:MEDFileAnyTypeField1TS(fileName,fieldName,iteration,order,loadAll,ms)
{
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileIntField1TS::MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeField1TS(fid,fileName,fieldName,iteration,order,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
/*!
* This constructor is a shallow copy constructor. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
* If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
throw e;
}
+MEDFileAnyTypeFieldMultiTS::MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileFieldGlobsReal(fileName)
+{
+ _content=BuildContentFrom(fid,fileName,loadAll,ms);
+ loadGlobals(fid);
+}
+catch(INTERP_KERNEL::Exception& e)
+{
+ throw e;
+}
+
MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTS::BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
{
med_field_type typcha;
throw e;
}
+MEDFileAnyTypeFieldMultiTS::MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
+try:MEDFileFieldGlobsReal(fileName)
+{
+ _content=BuildContentFrom(fid,fileName,fieldName,loadAll,ms,entities);
+ loadGlobals(fid);
+}
+catch(INTERP_KERNEL::Exception& e)
+{
+ throw e;
+}
+
//= MEDFileIntFieldMultiTSWithoutSDA
MEDFileIntFieldMultiTSWithoutSDA *MEDFileIntFieldMultiTSWithoutSDA::New(med_idt fid, const std::string& fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
{
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
- MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> c=BuildContentFrom(fid,fileName,loadAll,0);
+ return MEDFileAnyTypeFieldMultiTS::New(fid,fileName,loadAll);
+}
+
+MEDFileAnyTypeFieldMultiTS *MEDFileAnyTypeFieldMultiTS::New(med_idt fid, const std::string& fileName, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> c=BuildContentFrom(fid,fileName,loadAll,0);//medfileexist
MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> ret=BuildNewInstanceFromContent(c,fileName);
ret->loadGlobals(fid);
return ret.retn();
{
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
+ return MEDFileAnyTypeFieldMultiTS::New(fid,fieldName,loadAll);
+}
+
+MEDFileAnyTypeFieldMultiTS *MEDFileAnyTypeFieldMultiTS::New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll)
+{
MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> c(BuildContentFrom(fid,fileName,fieldName,loadAll,0,0));
MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> ret=BuildNewInstanceFromContent(c,fileName);
ret->loadGlobals(fid);
writeLL(fid);
}
+/*!
+ * \return DataArrayChar * - a newly allocated array to be deallocated by the caller.
+ */
+DataArrayByte *MEDFileAnyTypeFieldMultiTS::serialize() const
+{
+ return GoForSerialization(*this);
+}
+
/*!
* This method alloc the arrays and load potentially huge arrays contained in this field.
* This method should be called when a MEDFileAnyTypeFieldMultiTS::New constructor has been with false as the last parameter.
*/
MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const std::string& fileName, bool loadAll)
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> ret=new MEDFileFieldMultiTS(fileName,loadAll,0);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> ret(new MEDFileFieldMultiTS(fileName,loadAll,0));
+ ret->contentNotNull();//to check that content type matches with \a this type.
+ return ret.retn();
+}
+
+MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(med_idt fid, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> ret(new MEDFileFieldMultiTS(fid,"",loadAll,0));//medfileexist
ret->contentNotNull();//to check that content type matches with \a this type.
return ret.retn();
}
*/
MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(const std::string& fileName, const std::string& fieldName, bool loadAll)
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> ret=new MEDFileFieldMultiTS(fileName,fieldName,loadAll,0);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> ret(new MEDFileFieldMultiTS(fileName,fieldName,loadAll,0));
+ ret->contentNotNull();//to check that content type matches with \a this type.
+ return ret.retn();
+}
+
+MEDFileFieldMultiTS *MEDFileFieldMultiTS::New(med_idt fid, const std::string& fieldName, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> ret(new MEDFileFieldMultiTS(fid,"",fieldName,loadAll,0));//medfileexist
ret->contentNotNull();//to check that content type matches with \a this type.
return ret.retn();
}
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileFieldMultiTS::MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeFieldMultiTS(fid,fileName,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
MEDFileFieldMultiTS::MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll,ms,entities)
{
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileFieldMultiTS::MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
+try:MEDFileAnyTypeFieldMultiTS(fid,fileName,fieldName,loadAll,ms,entities)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
MEDFileFieldMultiTS::MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent):MEDFileAnyTypeFieldMultiTS(other,shallowCopyOfContent)
{
}
*/
MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New(const std::string& fileName, bool loadAll)
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileIntFieldMultiTS> ret=new MEDFileIntFieldMultiTS(fileName,loadAll,0);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileIntFieldMultiTS> ret(new MEDFileIntFieldMultiTS(fileName,loadAll,0));
+ ret->contentNotNull();//to check that content type matches with \a this type.
+ return ret.retn();
+}
+
+MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New(med_idt fid, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileIntFieldMultiTS> ret(new MEDFileIntFieldMultiTS(fid,"",loadAll,0));//medfileexist
ret->contentNotNull();//to check that content type matches with \a this type.
return ret.retn();
}
return ret.retn();
}
+MEDFileIntFieldMultiTS *MEDFileIntFieldMultiTS::New(med_idt fid, const std::string& fieldName, bool loadAll)
+{
+ MEDCouplingAutoRefCountObjectPtr<MEDFileIntFieldMultiTS> ret=new MEDFileIntFieldMultiTS(fid,"",fieldName,loadAll,0);//medfileexist
+ ret->contentNotNull();//to check that content type matches with \a this type.
+ return ret.retn();
+}
+
/*!
* Returns a new instance of MEDFileIntFieldMultiTS. If \a shallowCopyOfContent is true the content of \a other is shallow copied.
* If \a shallowCopyOfContent is false, \a other is taken to be the content of \a this.
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileIntFieldMultiTS::MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms)
+try:MEDFileAnyTypeFieldMultiTS(fid,fileName,loadAll,ms)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
MEDFileIntFieldMultiTS::MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
try:MEDFileAnyTypeFieldMultiTS(fileName,fieldName,loadAll,ms,entities)
{
catch(INTERP_KERNEL::Exception& e)
{ throw e; }
+MEDFileIntFieldMultiTS::MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
+try:MEDFileAnyTypeFieldMultiTS(fid,fileName,fieldName,loadAll,ms,entities)
+{
+}
+catch(INTERP_KERNEL::Exception& e)
+{ throw e; }
+
DataArrayInt *MEDFileIntFieldMultiTS::getUndergroundDataArray(int iteration, int order) const
{
return static_cast<DataArrayInt *>(contentNotNull()->getUndergroundDataArray(iteration,order));
writeLL(fid);
}
+/*!
+ * \return DataArrayChar * - a newly allocated array to be deallocated by the caller.
+ */
+DataArrayByte *MEDFileFields::serialize() const
+{
+ return GoForSerialization(*this);
+}
+
/*!
* This method alloc the arrays and load potentially huge arrays contained in this field.
* This method should be called when a MEDFileAnyTypeFieldMultiTS::New constructor has been with false as the last parameter.
protected:
MEDLOADER_EXPORT MEDFileAnyTypeField1TS();
MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
+ MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
+ MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
+ MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, const std::string& fileName);
MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
// direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content
public:
MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fileName, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
MEDLOADER_EXPORT int getDimension() const;
MEDLOADER_EXPORT int getIteration() const;
MEDLOADER_EXPORT int getOrder() const;
MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
public:
MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
+ MEDLOADER_EXPORT DataArrayByte *serialize() const;
MEDLOADER_EXPORT void loadArrays();
MEDLOADER_EXPORT void loadArraysIfNecessary();
MEDLOADER_EXPORT void unloadArrays();
MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
public:
+ MEDLOADER_EXPORT void writeLL(med_idt fid) const;
//! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
MEDLOADER_EXPORT void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
//! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
{
public:
MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileField1TS *New(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
MEDLOADER_EXPORT static MEDFileField1TS *New();
MEDLOADER_EXPORT MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const;
private:
~MEDFileField1TS() { }
MEDFileField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
MEDFileField1TS(const MEDFileField1TSWithoutSDA& other, bool shallowCopyOfContent);
MEDFileField1TS();
};
public:
MEDLOADER_EXPORT static MEDFileIntField1TS *New();
MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileIntField1TS *New(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
MEDLOADER_EXPORT MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
MEDLOADER_EXPORT MEDFileAnyTypeField1TS *shallowCpy() const;
~MEDFileIntField1TS() { }
MEDFileIntField1TS();
MEDFileIntField1TS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileIntField1TS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms);
MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileIntField1TS(med_idt fid, const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms);
MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent);
};
protected:
MEDFileAnyTypeFieldMultiTS();
MEDFileAnyTypeFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
MEDFileAnyTypeFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
+ MEDFileAnyTypeFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
MEDFileAnyTypeFieldMultiTS(const MEDFileAnyTypeFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c, const std::string& fileName);
static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities);
public:
MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, const std::string& fileName, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll=true);
MEDLOADER_EXPORT void loadArrays();
MEDLOADER_EXPORT void loadArraysIfNecessary();
MEDLOADER_EXPORT void unloadArrays();
MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
+ MEDLOADER_EXPORT DataArrayByte *serialize() const;
MEDLOADER_EXPORT void writeLL(med_idt fid) const;
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
public:
MEDLOADER_EXPORT static MEDFileFieldMultiTS *New();
MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
MEDLOADER_EXPORT static MEDFileFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
MEDFileFieldMultiTS();
MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
MEDFileFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
+ MEDFileFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
};
/*!
public:
MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New();
MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
MEDFileIntFieldMultiTS();
MEDFileIntFieldMultiTS(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
MEDFileIntFieldMultiTS(const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
+ MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, bool loadAll, const MEDFileMeshes *ms);
MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
+ MEDFileIntFieldMultiTS(med_idt fid, const std::string& fileName, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities=0);
};
class MEDFileAnyTypeFieldMultiTSIterator
public:
MEDLOADER_EXPORT static MEDFileFields *New();
MEDLOADER_EXPORT static MEDFileFields *New(const std::string& fileName, bool loadAll=true);
+ //MEDLOADER_EXPORT static MEDFileFields *New(med_idt fid, bool loadAll=true);
MEDLOADER_EXPORT static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0);
MEDLOADER_EXPORT static MEDFileFields *LoadSpecificEntities(const std::string& fileName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
MEDLOADER_EXPORT MEDFileFields *deepCpy() const;
MEDLOADER_EXPORT MEDFileFields *shallowCpy() const;
MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
+ MEDLOADER_EXPORT DataArrayByte *serialize() const;
MEDLOADER_EXPORT void writeLL(med_idt fid) const;
MEDLOADER_EXPORT void loadArrays();
MEDLOADER_EXPORT void loadArraysIfNecessary();