Salome HOME
Check mesh size before export
[modules/smesh.git] / src / SMESH / SMESH_Mesh.hxx
index 79e349f11ee672b7c08b456e3dcf082ef8a84c4d..e93fda65ea540428e6675b573a868e622a4b2ddf 100644 (file)
@@ -245,12 +245,22 @@ class SMESH_EXPORT SMESH_Mesh
    */
   typedef TopTools_IndexedDataMapOfShapeListOfShape TAncestorMap;
   const TAncestorMap& GetAncestorMap() const { return _mapAncestors; }
+
   /*!
    * \brief Check group names for duplications.
    *  Consider maximum group name length stored in MED file
    */
   bool HasDuplicatedGroupNamesMED();
 
+  /*!
+   * \brief Exception thrown by Export*() in case if a mesh is too large for export
+   *        due to limitation of a format
+   */
+  struct TooLargeForExport : public std::runtime_error
+  {
+    TooLargeForExport(const char* format):runtime_error(format) {}
+  };
+
   void ExportMED(const char *        theFile,
                  const char*         theMeshName = NULL,
                  bool                theAutoGroups = true,