X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileMeshReadSelector.cxx;h=b808e776088e5da63a0b14f0bb660c54ebcd0316;hb=d5f2b9cd2ec721b8411ed143dee57234e576c369;hp=945d02b168aa1322972ac0366a543740bf3f5c9c;hpb=29d1c4eea5500f16f9d8a6e9ca993a8ec90f0eef;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileMeshReadSelector.cxx b/src/MEDLoader/MEDFileMeshReadSelector.cxx index 945d02b16..b808e7760 100644 --- a/src/MEDLoader/MEDFileMeshReadSelector.cxx +++ b/src/MEDLoader/MEDFileMeshReadSelector.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D +// Copyright (C) 2007-2019 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,7 +20,7 @@ #include "MEDFileMeshReadSelector.hxx" -using namespace ParaMEDMEM; +using namespace MEDCoupling; MEDFileMeshReadSelector::MEDFileMeshReadSelector():_code(0xFFFFFFFF) { @@ -60,6 +60,21 @@ bool MEDFileMeshReadSelector::isNodeNameFieldReading() const return _code & 0x00000008; } +bool MEDFileMeshReadSelector::isCellNumFieldReading() const +{ + return _code & 0x00000010; +} + +bool MEDFileMeshReadSelector::isNodeNumFieldReading() const +{ + return _code & 0x00000020; +} + +bool MEDFileMeshReadSelector::isGlobalNodeNumFieldReading() const +{ + return _code & 0x00000040; +} + void MEDFileMeshReadSelector::setCellFamilyFieldReading(bool b) { unsigned int code(_code & 0xFFFFFFFE); @@ -96,13 +111,43 @@ void MEDFileMeshReadSelector::setNodeNameFieldReading(bool b) _code=code; } +void MEDFileMeshReadSelector::setCellNumFieldReading(bool b) +{ + unsigned int code(_code & 0xFFFFFFEF); + unsigned int b2=b?1:0; + b2<<=4; + code+=b2; + _code=code; +} + +void MEDFileMeshReadSelector::setNodeNumFieldReading(bool b) +{ + unsigned int code(_code & 0xFFFFFFDF); + unsigned int b2=b?1:0; + b2<<=5; + code+=b2; + _code=code; +} + +void MEDFileMeshReadSelector::setGlobalNodeNumFieldReading(bool b) +{ + unsigned int code(_code & 0xFFFFFFBF); + unsigned int b2=b?1:0; + b2<<=6; + code+=b2; + _code=code; +} + void MEDFileMeshReadSelector::reprAll(std::ostream& str) const { str << "MEDFileMeshReadSelector (code=" << _code << ") : \n"; str << "Read family field on cells : " << ReprStatus(isCellFamilyFieldReading()) << std::endl; str << "Read family field on nodes : " << ReprStatus(isNodeFamilyFieldReading()) << std::endl; - str << "Read family name on cells : " << ReprStatus(isCellNameFieldReading()) << std::endl; - str << "Read family name on nodes : " << ReprStatus(isNodeNameFieldReading()); + str << "Read name field on cells : " << ReprStatus(isCellNameFieldReading()) << std::endl; + str << "Read name field on nodes : " << ReprStatus(isNodeNameFieldReading()) << std::endl; + str << "Read number field on cells : " << ReprStatus(isCellNumFieldReading()) << std::endl; + str << "Read number field name on nodes : " << ReprStatus(isNodeNumFieldReading()) << std::endl; + str << "Read global number field name on nodes : " << ReprStatus(isGlobalNodeNumFieldReading()); } std::string MEDFileMeshReadSelector::ReprStatus(bool v)