]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Add "const char* name" argument to consrtucctor of SMESH_subMeshEventListener
authoreap <eap@opencascade.com>
Wed, 18 Jan 2012 12:07:14 +0000 (12:07 +0000)
committereap <eap@opencascade.com>
Wed, 18 Jan 2012 12:07:14 +0000 (12:07 +0000)
src/SMESH/SMESH_subMeshEventListener.hxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx
src/StdMeshers/StdMeshers_Import_1D.cxx
src/StdMeshers/StdMeshers_Penta_3D.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.cxx
src/StdMeshers/StdMeshers_Propagation.cxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx
src/StdMeshers/StdMeshers_ViscousLayers.cxx

index a978c4591555c05366df2cb6f19bb86a9a5543bc..bc3246a99aa6e57095f9763403d3cbd9382ccd2d 100644 (file)
@@ -47,8 +47,16 @@ class SMESH_EXPORT SMESH_subMeshEventListener
   bool myIsDeletable; //!< if true, it will be deleted by SMESH_subMesh
   mutable std::set<SMESH_subMesh*> myBusySM; //!< to avoid infinite recursion via events
   friend class SMESH_subMesh;
-public:
-  SMESH_subMeshEventListener(bool isDeletable):myIsDeletable(isDeletable) {}
+#ifdef _DEBUG_
+  const char* myName; //!< identifier used for debug
+#endif
+
+ public:
+  SMESH_subMeshEventListener(bool isDeletable, const char* name) :myIsDeletable(isDeletable)
+#ifdef _DEBUG_
+    ,myName(name)
+#endif
+  {}
   bool IsDeletable() const { return myIsDeletable; }
   /*!
    * \brief Do something on a certain event
index 4c034b99c814a093e75ebe3077c425e0c04e6ff3..981a90ac9c17f039ece51bdb9be6b158b9c9f755 100644 (file)
@@ -169,7 +169,8 @@ namespace {
     SMESH_Mesh* myMesh;
     string      myMeshPartIOR;
     //!< Constructor
-    TSearchersDeleter(): SMESH_subMeshEventListener( false ), // won't be deleted by submesh
+    TSearchersDeleter(): SMESH_subMeshEventListener( false, // won't be deleted by submesh
+                                                     "SMESH_MeshEditor_i::TSearchersDeleter"),
                          myMesh(0) {}
     //!< Delete theNodeSearcher
     static void Delete()
index dcce058db0d9433a78e00768f9a648af8e0665c5..a1f94b36dbc4479a7438ac26fcdda2b049041bbb 100644 (file)
@@ -1714,15 +1714,16 @@ namespace
 {
   /*!
    * \brief Event listener setting/unsetting _alwaysComputed flag to
-   *        submeshes of inferior levels to avoid their computing
+   *        submeshes of inferior levels to prevent their computing
    */
   struct _EventListener : public SMESH_subMeshEventListener
   {
     string _algoName;
 
     _EventListener(const string& algoName):
-      SMESH_subMeshEventListener(/*isDeletable=*/true), _algoName(algoName) {}
-
+      SMESH_subMeshEventListener(/*isDeletable=*/true,"StdMeshers_Cartesian_3D::_EventListener"),
+      _algoName(algoName)
+    {}
     // --------------------------------------------------------------------------------
     // setting/unsetting _alwaysComputed flag to submeshes of inferior levels
     //
index fb8c86eb92e0de3edf7bb6dc16b84a656fbdcd15..6df82b480c8a6312a5e78ad5886d39995461610a 100644 (file)
@@ -150,7 +150,9 @@ namespace {
 
   struct VertexNodesRestoringListener : public SMESH_subMeshEventListener
   {
-    VertexNodesRestoringListener():SMESH_subMeshEventListener(0) // won't be deleted by submesh
+    VertexNodesRestoringListener():
+      SMESH_subMeshEventListener(0, // won't be deleted by submesh
+                                 "StdMeshers_CompositeSegment_1D::VertexNodesRestoringListener")
     {}
   /*!
    * \brief Restore nodes on internal vertices of a complex side
index 562a1f8beaa77018f3c6b6351a24eac4bbb17b13..b95e12b90d93665507ffb41203feb0a088d4d7bc 100644 (file)
@@ -246,7 +246,8 @@ namespace // INTERNAL STUFF
     typedef map< SMESH_Mesh*, list< _ImportData > > TMesh2ImpData;
     TMesh2ImpData _tgtMesh2ImportData;
 
-    _Listener():SMESH_subMeshEventListener(/*isDeletable=*/false){}
+    _Listener():SMESH_subMeshEventListener(/*isDeletable=*/false,
+                                           "StdMeshers_Import_1D::_Listener") {}
 
   public:
     // return poiter to a static listener
index 3025b1bf963e1bfdd97015bd35338c60e15a9b88..fd52d5877352163c3377aafbf17849635f493ab6 100644 (file)
@@ -849,7 +849,8 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
   // assure that mesh on the top face will be cleaned when it is cleaned
   // on the bottom face
   SMESH_subMesh* volSM = pMesh->GetSubMesh( myTool->GetSubShape() );
-  volSM->SetEventListener( new SMESH_subMeshEventListener(true),
+  volSM->SetEventListener( new SMESH_subMeshEventListener(true, // deletable by SMESH_subMesh
+                                                          "StdMeshers_Penta_3D"),
                            SMESH_subMeshEventListenerData::MakeData( aSubMesh1 ),
                            aSubMesh0 ); // translate CLEAN event of aSubMesh0 to aSubMesh1
 }
index 09a2acf4f4cbeb6079bfb2ffe3b66e8609f8d895..8dab2b8bcc8c01815bc94c77c193a9045b039edf 100644 (file)
@@ -2069,8 +2069,8 @@ namespace {
 
   struct HypModifWaiter: SMESH_subMeshEventListener
   {
-    HypModifWaiter():SMESH_subMeshEventListener(0){} // won't be deleted by submesh
-
+    HypModifWaiter():SMESH_subMeshEventListener(false,// won't be deleted by submesh
+                                                "StdMeshers_ProjectionUtils::HypModifWaiter") {}
     void ProcessEvent(const int event, const int eventType, SMESH_subMesh* subMesh,
                       EventListenerData*, const SMESH_Hypothesis*)
     {
@@ -2102,7 +2102,8 @@ namespace {
   //================================================================================
 
   SMESH_subMeshEventListener* GetSrcSubMeshListener() {
-    static SMESH_subMeshEventListener srcListener(0); // won't be deleted by submesh
+    static SMESH_subMeshEventListener srcListener(false, // won't be deleted by submesh
+                                                  "StdMeshers_ProjectionUtils::SrcSubMeshListener");
     return &srcListener;
   }
 }
index 8bda60ea479eb16ee115f767ae88f98f55a86e07..db3316baead090daf9ea37d841e407812c9f0bde 100644 (file)
@@ -449,7 +449,8 @@ namespace {
   //================================================================================
 
   PropagationMgr::PropagationMgr()
-    : SMESH_subMeshEventListener( false ) // won't be deleted by submesh
+    : SMESH_subMeshEventListener( false, // won't be deleted by submesh
+                                  "StdMeshers_Propagation::PropagationMgr")
   {}
   //================================================================================
   /*!
index 3b7b34f13138cf45658d5fff47a29aafbb61e9a1..b153b077b6a5be748395da2c646fe3ad81cad2b9 100644 (file)
@@ -146,7 +146,8 @@ namespace
    */
   class TEdgeMarker : public SMESH_subMeshEventListener
   {
-    TEdgeMarker(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
+    TEdgeMarker(): SMESH_subMeshEventListener(/*isDeletable=*/false,
+                                              "StdMeshers_RadialQuadrangle_1D2D::TEdgeMarker") {}
   public:
     //!<  Return static listener
     static SMESH_subMeshEventListener* getListener()
index 4326b4f7aa2c63f46addb3800a7c256bffc34fec..1355a87e4862069d5e103e8ff5635acefddaa964 100644 (file)
@@ -122,7 +122,9 @@ namespace VISCOUS
    */
   class _SrinkShapeListener : SMESH_subMeshEventListener
   {
-    _SrinkShapeListener(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
+    _SrinkShapeListener()
+      : SMESH_subMeshEventListener(/*isDeletable=*/false,
+                                   "StdMeshers_ViscousLayers::_SrinkShapeListener") {}
     static SMESH_subMeshEventListener* Get() { static _SrinkShapeListener l; return &l; }
   public:
     virtual void ProcessEvent(const int                       event,
@@ -162,7 +164,9 @@ namespace VISCOUS
    */
   class _ViscousListener : SMESH_subMeshEventListener
   {
-    _ViscousListener(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
+    _ViscousListener():
+      SMESH_subMeshEventListener(/*isDeletable=*/false,
+                                 "StdMeshers_ViscousLayers::_ViscousListener") {}
     static SMESH_subMeshEventListener* Get() { static _ViscousListener l; return &l; }
   public:
     virtual void ProcessEvent(const int                       event,