+ std::string prepareMeshNameAndGroups( const char* file, CORBA::Boolean overwrite );
+
+ /*!
+ * Check and correct names of mesh groups
+ */
+ void checkGroupNames();
+
+ /*
+ * Write GEOM fields to MED file
+ */
+ void exportMEDFields( DriverMED_W_Field & writer,
+ SMESHDS_Mesh* meshDS,
+ const GEOM::ListOfFields& fields,
+ const char* geomAssocFields);
+ /*!
+ * Convert submesh ids into submesh interfaces
+ */
+ void convertMeshOrder(const TListOfListOfInt& theIdsOrder,
+ SMESH::submesh_array_array& theSubMeshOrder,
+ const bool theIsDump);
+
+ /*!
+ * \brief Finds concurrent sub-meshes
+ */
+ TListOfListOfInt findConcurrentSubMeshes();
+
+private:
+
+ static int _idGenerator;
+ ::SMESH_Mesh* _impl; // :: force no namespace here
+ SMESH_Gen_i* _gen_i;
+ int _id; // id given by creator (unique within the creator instance)
+ int _studyId;
+ std::map<int, SMESH::SMESH_subMesh_ptr> _mapSubMeshIor;
+ std::map<int, SMESH::SMESH_GroupBase_ptr> _mapGroups;
+ std::map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
+ SMESH_MeshEditor_i* _editor;
+ SMESH_MeshEditor_i* _previewEditor;
+ SMESH::MedFileInfo_var _medFileInfo;
+ SMESH_PreMeshInfo* _preMeshInfo; // mesh info before full loading from study file
+
+ SMESH_PreMeshInfo* & changePreMeshInfo() { return _preMeshInfo; }
+ friend class SMESH_PreMeshInfo;
+
+private:
+
+ // Data used to track changes of GEOM groups
+ struct TGeomGroupData {
+ // keep study entry but not ior because GEOM_Object actually changes if
+ // number of items in a group varies (1) <-> (>1)
+ std::string _groupEntry;
+ std::set<int> _indices; // indices of group items within group's main shape
+ CORBA::Object_var _smeshObject; // SMESH object depending on GEOM group
+ };
+ std::list<TGeomGroupData> _geomGroupData;
+ int _mainShapeTick; // to track modifications of the meshed shape
+
+ /*!
+ * Remember GEOM group data
+ */
+ void addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
+ CORBA::Object_ptr theSmeshObj);
+ /*!
+ * Remove GEOM group data relating to removed smesh object
+ */
+ void removeGeomGroupData(CORBA::Object_ptr theSmeshObj);
+ /*!
+ * Return new group contents if it has been changed and update group data
+ */
+ TopoDS_Shape newGroupShape( TGeomGroupData & groupData);