mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-15 18:11:21 +05:00
Add "const char* name" argument to consrtucctor of SMESH_subMeshEventListener
This commit is contained in:
parent
8a81427a0c
commit
fbae18cd7f
@ -47,8 +47,16 @@ class SMESH_EXPORT SMESH_subMeshEventListener
|
|||||||
bool myIsDeletable; //!< if true, it will be deleted by SMESH_subMesh
|
bool myIsDeletable; //!< if true, it will be deleted by SMESH_subMesh
|
||||||
mutable std::set<SMESH_subMesh*> myBusySM; //!< to avoid infinite recursion via events
|
mutable std::set<SMESH_subMesh*> myBusySM; //!< to avoid infinite recursion via events
|
||||||
friend class SMESH_subMesh;
|
friend class SMESH_subMesh;
|
||||||
public:
|
#ifdef _DEBUG_
|
||||||
SMESH_subMeshEventListener(bool isDeletable):myIsDeletable(isDeletable) {}
|
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; }
|
bool IsDeletable() const { return myIsDeletable; }
|
||||||
/*!
|
/*!
|
||||||
* \brief Do something on a certain event
|
* \brief Do something on a certain event
|
||||||
|
@ -169,7 +169,8 @@ namespace {
|
|||||||
SMESH_Mesh* myMesh;
|
SMESH_Mesh* myMesh;
|
||||||
string myMeshPartIOR;
|
string myMeshPartIOR;
|
||||||
//!< Constructor
|
//!< 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) {}
|
myMesh(0) {}
|
||||||
//!< Delete theNodeSearcher
|
//!< Delete theNodeSearcher
|
||||||
static void Delete()
|
static void Delete()
|
||||||
|
@ -1714,15 +1714,16 @@ namespace
|
|||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* \brief Event listener setting/unsetting _alwaysComputed flag to
|
* \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
|
struct _EventListener : public SMESH_subMeshEventListener
|
||||||
{
|
{
|
||||||
string _algoName;
|
string _algoName;
|
||||||
|
|
||||||
_EventListener(const 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
|
// setting/unsetting _alwaysComputed flag to submeshes of inferior levels
|
||||||
//
|
//
|
||||||
|
@ -150,7 +150,9 @@ namespace {
|
|||||||
|
|
||||||
struct VertexNodesRestoringListener : public SMESH_subMeshEventListener
|
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
|
* \brief Restore nodes on internal vertices of a complex side
|
||||||
|
@ -246,7 +246,8 @@ namespace // INTERNAL STUFF
|
|||||||
typedef map< SMESH_Mesh*, list< _ImportData > > TMesh2ImpData;
|
typedef map< SMESH_Mesh*, list< _ImportData > > TMesh2ImpData;
|
||||||
TMesh2ImpData _tgtMesh2ImportData;
|
TMesh2ImpData _tgtMesh2ImportData;
|
||||||
|
|
||||||
_Listener():SMESH_subMeshEventListener(/*isDeletable=*/false){}
|
_Listener():SMESH_subMeshEventListener(/*isDeletable=*/false,
|
||||||
|
"StdMeshers_Import_1D::_Listener") {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// return poiter to a static listener
|
// return poiter to a static listener
|
||||||
|
@ -849,7 +849,8 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
|
|||||||
// assure that mesh on the top face will be cleaned when it is cleaned
|
// assure that mesh on the top face will be cleaned when it is cleaned
|
||||||
// on the bottom face
|
// on the bottom face
|
||||||
SMESH_subMesh* volSM = pMesh->GetSubMesh( myTool->GetSubShape() );
|
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 ),
|
SMESH_subMeshEventListenerData::MakeData( aSubMesh1 ),
|
||||||
aSubMesh0 ); // translate CLEAN event of aSubMesh0 to aSubMesh1
|
aSubMesh0 ); // translate CLEAN event of aSubMesh0 to aSubMesh1
|
||||||
}
|
}
|
||||||
|
@ -2069,8 +2069,8 @@ namespace {
|
|||||||
|
|
||||||
struct HypModifWaiter: SMESH_subMeshEventListener
|
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,
|
void ProcessEvent(const int event, const int eventType, SMESH_subMesh* subMesh,
|
||||||
EventListenerData*, const SMESH_Hypothesis*)
|
EventListenerData*, const SMESH_Hypothesis*)
|
||||||
{
|
{
|
||||||
@ -2102,7 +2102,8 @@ namespace {
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
SMESH_subMeshEventListener* GetSrcSubMeshListener() {
|
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;
|
return &srcListener;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -449,7 +449,8 @@ namespace {
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
PropagationMgr::PropagationMgr()
|
PropagationMgr::PropagationMgr()
|
||||||
: SMESH_subMeshEventListener( false ) // won't be deleted by submesh
|
: SMESH_subMeshEventListener( false, // won't be deleted by submesh
|
||||||
|
"StdMeshers_Propagation::PropagationMgr")
|
||||||
{}
|
{}
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
|
@ -146,7 +146,8 @@ namespace
|
|||||||
*/
|
*/
|
||||||
class TEdgeMarker : public SMESH_subMeshEventListener
|
class TEdgeMarker : public SMESH_subMeshEventListener
|
||||||
{
|
{
|
||||||
TEdgeMarker(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
|
TEdgeMarker(): SMESH_subMeshEventListener(/*isDeletable=*/false,
|
||||||
|
"StdMeshers_RadialQuadrangle_1D2D::TEdgeMarker") {}
|
||||||
public:
|
public:
|
||||||
//!< Return static listener
|
//!< Return static listener
|
||||||
static SMESH_subMeshEventListener* getListener()
|
static SMESH_subMeshEventListener* getListener()
|
||||||
|
@ -122,7 +122,9 @@ namespace VISCOUS
|
|||||||
*/
|
*/
|
||||||
class _SrinkShapeListener : SMESH_subMeshEventListener
|
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; }
|
static SMESH_subMeshEventListener* Get() { static _SrinkShapeListener l; return &l; }
|
||||||
public:
|
public:
|
||||||
virtual void ProcessEvent(const int event,
|
virtual void ProcessEvent(const int event,
|
||||||
@ -162,7 +164,9 @@ namespace VISCOUS
|
|||||||
*/
|
*/
|
||||||
class _ViscousListener : SMESH_subMeshEventListener
|
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; }
|
static SMESH_subMeshEventListener* Get() { static _ViscousListener l; return &l; }
|
||||||
public:
|
public:
|
||||||
virtual void ProcessEvent(const int event,
|
virtual void ProcessEvent(const int event,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user