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
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()
{
/*!
* \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
//
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
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
// 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
}
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*)
{
//================================================================================
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;
}
}
//================================================================================
PropagationMgr::PropagationMgr()
- : SMESH_subMeshEventListener( false ) // won't be deleted by submesh
+ : SMESH_subMeshEventListener( false, // won't be deleted by submesh
+ "StdMeshers_Propagation::PropagationMgr")
{}
//================================================================================
/*!
*/
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()
*/
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,
*/
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,