-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
med_access_mode MEDFileUtilities::TraduceWriteMode(int medloaderwritemode)
{
switch(medloaderwritemode)
- {
+ {
case 2:
return MED_ACC_CREAT;
case 1:
return MED_ACC_RDWR;
default:
throw INTERP_KERNEL::Exception("Invalid write mode specified ! must be 0(write with no question), 1(append) or 2(creation)");
- }
+ }
}
const char *MEDFileUtilities::GetReadableMEDFieldType(med_field_type ft)
static const char medInt32[]="MED_INT32";
static const char medInt64[]="MED_INT64";
switch(ft)
- {
+ {
case MED_FLOAT64:
return medFloat64;
case MED_INT32:
return medInt64;
default:
throw INTERP_KERNEL::Exception("Non supported field type ! Should be FLOAT64, INT32 or INT64 !");
- }
+ }
}
void MEDFileUtilities::CheckMEDCode(int code, med_idt fid, const std::string& msg)
std::ostringstream oss;
oss << " File : \"" << fileName << "\"";
switch(status)
- {
+ {
case MEDLoaderBase::DIR_LOCKED:
{
oss << " has been detected as unreadable : impossible to read anything !";
oss << " has been detected as WRITE ONLY : impossible to read anything !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
- }
+ }
AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
if(fid<0)
{
{
}
-MEDFileUtilities::AutoFid::operator med_idt() const
-{
- return _fid;
-}
-
MEDFileUtilities::AutoFid::~AutoFid()
{
MEDfileClose(_fid);
}
-ParaMEDMEM::MEDFileWritable::MEDFileWritable():_too_long_str(0),_zipconn_pol(2)
+MEDCoupling::MEDFileWritable::MEDFileWritable():_too_long_str(0),_zipconn_pol(2)
{
}
-void ParaMEDMEM::MEDFileWritable::copyOptionsFrom(const MEDFileWritable& other) const
+void MEDCoupling::MEDFileWritable::copyOptionsFrom(const MEDFileWritable& other) const
{
_too_long_str=other._too_long_str;
_zipconn_pol=other._zipconn_pol;
}
-int ParaMEDMEM::MEDFileWritable::getTooLongStrPolicy() const
+int MEDCoupling::MEDFileWritable::getTooLongStrPolicy() const
{
return _too_long_str;
}
-void ParaMEDMEM::MEDFileWritable::setTooLongStrPolicy(int newVal)
+void MEDCoupling::MEDFileWritable::setTooLongStrPolicy(int newVal)
{
if(newVal!=2 && newVal!=1 && newVal!=0)
throw INTERP_KERNEL::Exception("MEDFileWritable::setTooLongStrPolicy : invalid policy should be in 0,1 or 2 !");
_too_long_str=newVal;
}
-int ParaMEDMEM::MEDFileWritable::getZipConnPolicy()
+int MEDCoupling::MEDFileWritable::getZipConnPolicy()
{
return _zipconn_pol;
}
-void ParaMEDMEM::MEDFileWritable::setZipConnPolicy(int newVal)
+void MEDCoupling::MEDFileWritable::setZipConnPolicy(int newVal)
{
_zipconn_pol=newVal;
}