X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_W_Field.h;h=d3438237102a024f4e32f7b990dead54709c6d33;hp=51cbb32c20657cf36aec975cf20cd3cc9e211a9f;hb=ef9db08c815361b806e558b78acf445adc43613d;hpb=385d4cede5f752d0eec26c306f3b5e14511e2a3d diff --git a/src/DriverMED/DriverMED_W_Field.h b/src/DriverMED/DriverMED_W_Field.h index 51cbb32c2..d34382371 100644 --- a/src/DriverMED/DriverMED_W_Field.h +++ b/src/DriverMED/DriverMED_W_Field.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -31,6 +31,7 @@ #include "Driver_SMESHDS_Mesh.h" #include "SMDSAbs_ElementType.hxx" #include "SMDS_ElemIterator.hxx" +#include "MED_Common.hxx" #include #include @@ -57,15 +58,19 @@ class MESHDRIVERMED_EXPORT DriverMED_W_Field: public Driver_SMESHDS_Mesh void AddValue( int val ); /* - * Returns elements in the order they are written in MED file. Result can be NULL! + * Return elements in the order they are written in MED file. Result can be NULL! */ SMDS_ElemIteratorPtr GetOrderedElems(); /* * Add one field to the file */ - virtual Status Perform(); + Status Perform() override; + protected: + + Status PerformInternal(MED::PWrapper& medFile); + private: std::string _fieldName; @@ -80,4 +85,16 @@ class MESHDRIVERMED_EXPORT DriverMED_W_Field: public Driver_SMESHDS_Mesh std::vector< std::pair< SMDSAbs_EntityType, int > > _nbElemsByGeom; }; +#include "MEDCouplingMemArray.hxx" + +class MESHDRIVERMED_EXPORT DriverMED_W_Field_Mem : public DriverMED_W_Field +{ +public: + DriverMED_W_Field_Mem(MEDCoupling::MCAuto data):_data(data) { } + Status Perform() override; + MEDCoupling::MCAuto getData() const { return _data; } +private: + MEDCoupling::MCAuto _data; +}; + #endif