Salome HOME
Merge from BR_DEBUG_3_2_0b1
[modules/smesh.git] / src / SMESH / SMESH_subMesh.hxx
index 07909232de3d44fb25a16042405e4dd0afe275fe..053389a50d13b87266797472a87a8b721f30cca0 100644 (file)
@@ -17,7 +17,7 @@
 //  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -29,6 +29,8 @@
 #ifndef _SMESH_SUBMESH_HXX_
 #define _SMESH_SUBMESH_HXX_
 
+#include "SMESH_SMESH.hxx"
+
 #include "SMESHDS_Mesh.hxx"
 #include "SMESHDS_SubMesh.hxx"
 #include "SMESH_Hypothesis.hxx"
@@ -46,7 +48,7 @@ class SMESH_Hypothesis;
 class SMESH_Algo;
 class SMESH_Gen;
 
-class SMESH_subMesh
+class SMESH_EXPORT SMESH_subMesh
 {
  public:
   SMESH_subMesh(int Id, SMESH_Mesh * father, SMESHDS_Mesh * meshDS,
@@ -70,7 +72,7 @@ class SMESH_subMesh
   const map < int, SMESH_subMesh * >&DependsOn();
   //const map < int, SMESH_subMesh * >&Dependants();
 
-  const TopoDS_Shape & GetSubShape();
+  const TopoDS_Shape & GetSubShape() const;
 
 //  bool _vertexSet;                   // only for vertex subMesh, set to false for dim > 0
 
@@ -93,7 +95,7 @@ class SMESH_subMesh
   enum compute_event
   {
     MODIF_HYP, MODIF_ALGO_STATE, COMPUTE,
-    CLEAN, CLEANDEP, SUBMESH_COMPUTED, SUBMESH_RESTORED,
+    CLEAN, SUBMESH_COMPUTED, SUBMESH_RESTORED,
     MESH_ENTITY_REMOVED, CHECK_COMPUTE_STATE
     };
 
@@ -103,17 +105,13 @@ class SMESH_subMesh
   SMESH_Hypothesis::Hypothesis_Status
     SubMeshesAlgoStateEngine(int event, SMESH_Hypothesis * anHyp);
 
-  int GetAlgoState() { return _algoState; }
+  int GetAlgoState() const { return _algoState; }
+  int GetComputeState() const { return _computeState; };
 
   void DumpAlgoState(bool isMain);
 
   bool ComputeStateEngine(int event);
 
-  int GetComputeState()
-  {
-    return _computeState;
-  };
-
   bool IsConform(const SMESH_Algo* theAlgo);
   // check if a conform mesh will be produced by the Algo
 
@@ -121,7 +119,11 @@ class SMESH_subMesh
   // return true if theHypothesis can be attached to me:
   // its dimention is checked
 
-  bool IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis) const;
+  static bool IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis,
+                                    const TopAbs_ShapeEnum  theShapeType);
+
+  bool IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis) const
+  { return IsApplicableHypotesis( theHypothesis, _subShape.ShapeType() ); }
   // return true if theHypothesis can be used to mesh me:
   // its shape type is checked