MEDFileField.cxx
MEDFileParameter.cxx
MEDFileData.cxx
+ MEDFileMeshReadSelector.cxx
SauvMedConvertor.cxx
SauvReader.cxx
SauvWriter.cxx
--- /dev/null
+// Copyright (C) 2007-2013 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.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (CEA/DEN)
+
+#include "MEDFileMeshReadSelector.hxx"
+
+using namespace ParaMEDMEM;
+
+MEDFileMeshReadSelector::MEDFileMeshReadSelector():_code(0)
+{
+}
+
+MEDFileMeshReadSelector::MEDFileMeshReadSelector(unsigned int code):_code(code)
+{
+}
+
+unsigned int MEDFileMeshReadSelector::getCode() const
+{
+ return _code;
+}
+
+void MEDFileMeshReadSelector::setCode(unsigned int newCode)
+{
+ _code=newCode;
+}
+
+bool MEDFileMeshReadSelector::isCellFamilyFieldReading() const
+{
+ return _code & 0x00000001;
+}
+
+bool MEDFileMeshReadSelector::isNodeFamilyFieldReading() const
+{
+ return _code & 0x00000002;
+}
+
+bool MEDFileMeshReadSelector::isCellNameFieldReading() const
+{
+ return _code & 0x00000004;
+}
+
+bool MEDFileMeshReadSelector::isNodeNameFieldReading() const
+{
+ return _code & 0x00000008;
+}
+
+void MEDFileMeshReadSelector::setCellFamilyFieldReading(bool b)
+{
+}
+
+void MEDFileMeshReadSelector::setNodeFamilyFieldReading(bool b)
+{
+}
+
+void MEDFileMeshReadSelector::setCellNameFieldReading(bool b)
+{
+}
+
+void MEDFileMeshReadSelector::setNodeNameFieldReading(bool b)
+{
+}
+
+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());
+}
+
+std::string MEDFileMeshReadSelector::ReprStatus(bool v)
+{
+ if(v)
+ return std::string("ON");
+ else
+ return std::string("OFF");
+}
+
--- /dev/null
+// Copyright (C) 2007-2013 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.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (CEA/DEN)
+
+#ifndef __MEDFILEMESHREADSELECTOR_HXX__
+#define __MEDFILEMESHREADSELECTOR_HXX__
+
+#include "MEDLoaderDefines.hxx"
+
+#include <sstream>
+#include <string>
+
+namespace ParaMEDMEM
+{
+ class MEDLOADER_EXPORT 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;
+ void setCellFamilyFieldReading(bool b);
+ void setNodeFamilyFieldReading(bool b);
+ void setCellNameFieldReading(bool b);
+ void setNodeNameFieldReading(bool b);
+ void reprAll(std::ostream& str) const;
+ private:
+ static std::string ReprStatus(bool v);
+ private:
+ //bit #0 cell family field
+ //bit #1 node family field
+ //bit #2 cell name field
+ //bit #3 node name field
+ unsigned int _code;
+ };
+}
+
+#endif
MEDFileMesh.cxx MEDFileMeshElt.cxx MEDFileBasis.cxx \
MEDFileMeshLL.cxx MEDFileField.cxx MEDFileData.cxx \
SauvMedConvertor.cxx SauvReader.cxx SauvWriter.cxx \
-MEDFileParameter.cxx
+MEDFileParameter.cxx MEDFileMeshReadSelector.cxx
libmedloader_la_CPPFLAGS= $(MED3_INCLUDES) $(HDF5_INCLUDES) @CXXTMPDPTHFLAGS@ \
-I$(srcdir)/../INTERP_KERNEL \
#include "MEDFileField.hxx"
#include "MEDFileParameter.hxx"
#include "MEDFileData.hxx"
+#include "MEDFileMeshReadSelector.hxx"
#include "MEDLoaderTypemaps.i"
#include "SauvReader.hxx"
#include "SauvWriter.hxx"
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;
+ void setCellFamilyFieldReading(bool b);
+ void setNodeFamilyFieldReading(bool b);
+ void setCellNameFieldReading(bool b);
+ void setNodeNameFieldReading(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: