+
+ /*!
+ * Collect statistic of mesh elements given by iterator
+ */
+ static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
+ SMESH::smIdType_array& theInfo);
+ /*!
+ * \brief Return iterator on elements of given type in given object
+ */
+ static SMDS_ElemIteratorPtr GetElements(SMESH::SMESH_IDSource_ptr obj,
+ SMESH::ElementType type);
+
+ // =========================
+ // SMESH_IDSource interface
+ // =========================
+
+ virtual SMESH::smIdType_array* GetIDs();
+ /*!
+ * Returns number of mesh elements of each \a EntityType
+ * Result array of number of elements per \a EntityType
+ * Inherited from SMESH_IDSource
+ */
+ virtual SMESH::smIdType_array* GetMeshInfo();
+ /*!
+ * Returns number of mesh elements of each \a ElementType
+ */
+ virtual SMESH::smIdType_array* GetNbElementsByType();
+ /*!
+ * Returns types of elements it contains
+ */
+ virtual SMESH::array_of_ElementType* GetTypes();
+ /*!
+ * Returns self
+ */
+ virtual SMESH::SMESH_Mesh_ptr GetMesh();
+ /*!
+ * Returns false if GetMeshInfo() returns incorrect information that may
+ * happen if mesh data is not yet fully loaded from the file of study.
+ */
+ bool IsMeshInfoCorrect();
+ /*!
+ * Returns mesh unstructed grid information.
+ */
+ virtual SALOMEDS::TMPFile* GetVtkUgStream();
+
+
+ std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
+ std::map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
+
+public:
+ std::string generateMeshName( );
+ std::string prepareMeshNameAndGroups( const char* file, CORBA::Boolean overwrite );
+ /*
+ * Write GEOM fields to MED file
+ */
+ void exportMEDFields( DriverMED_W_Field & writer,
+ SMESHDS_Mesh* meshDS,
+ const GEOM::ListOfFields& fields,
+ const char* geomAssocFields);
+private:
+ /*!
+ * Check and correct names of mesh groups
+ */
+ void checkGroupNames();
+
+ /*!
+ * 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 _nbInvalidHypos;
+ 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;