SALOME - SMESH
SMESH_subMeshEventListener.hxx
Go to the documentation of this file.
1
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
2
//
3
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5
//
6
// This library is free software; you can redistribute it and/or
7
// modify it under the terms of the GNU Lesser General Public
8
// License as published by the Free Software Foundation; either
9
// version 2.1 of the License.
10
//
11
// This library is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
// Lesser General Public License for more details.
15
//
16
// You should have received a copy of the GNU Lesser General Public
17
// License along with this library; if not, write to the Free Software
18
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
//
20
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
//
22
// SMESH SMESH : implementaion of SMESH idl descriptions
23
// File : SMESH_subMeshEventListener.hxx
24
// Created : Mon Nov 13 10:45:49 2006
25
// Author : Edward AGAPOV (eap)
26
//
27
#ifndef SMESH_subMeshEventListener_HeaderFile
28
#define SMESH_subMeshEventListener_HeaderFile
29
30
#include "
SMESH_SMESH.hxx
"
31
32
#include <list>
33
34
class
SMESH_subMesh
;
35
class
SMESH_Hypothesis
;
36
struct
SMESH_subMeshEventListenerData
;
37
38
// ------------------------------------------------------------------
42
// ------------------------------------------------------------------
43
44
class
SMESH_EXPORT
SMESH_subMeshEventListener
{
45
bool
myIsDeletable
;
46
public
:
47
SMESH_subMeshEventListener
(
bool
isDeletable):myIsDeletable(isDeletable) {}
48
bool
IsDeletable
()
const
{
return
myIsDeletable; }
61
virtual
void
ProcessEvent(
const
int
event,
62
const
int
eventType,
63
SMESH_subMesh
* subMesh,
64
SMESH_subMeshEventListenerData
* data,
65
const
SMESH_Hypothesis
* hyp = 0);
66
};
67
68
// ------------------------------------------------------------------
72
// ------------------------------------------------------------------
73
74
struct
SMESH_subMeshEventListenerData
75
{
76
bool
myIsDeletable
;
77
int
myType
;
78
std::list<SMESH_subMesh*>
mySubMeshes
;
79
// on the one storing this data
80
public
:
81
SMESH_subMeshEventListenerData
(
bool
isDeletable):
myIsDeletable
(isDeletable) {}
82
bool
IsDeletable
()
const
{
return
myIsDeletable
; }
83
93
static
SMESH_subMeshEventListenerData
*
MakeData
(
SMESH_subMesh
* dependentSM,
94
const
int
type = 0)
95
{
96
SMESH_subMeshEventListenerData
* data =
new
SMESH_subMeshEventListenerData
(
true
);
97
data->
mySubMeshes
.push_back( dependentSM );
98
data->
myType
= type;
99
return
data;
100
}
101
};
102
103
104
#endif
SMESH_subMeshEventListener::SMESH_subMeshEventListener
SMESH_subMeshEventListener(bool isDeletable)
Definition:
SMESH_subMeshEventListener.hxx:47
SMESH_subMeshEventListenerData::myIsDeletable
bool myIsDeletable
if true, it will be deleted by SMESH_subMesh
Definition:
SMESH_subMeshEventListener.hxx:76
SMESH_subMeshEventListener
A base for objects reacting on submesh events.
Definition:
SMESH_subMeshEventListener.hxx:44
SMESH_subMesh
Definition:
SMESH_subMesh.hxx:59
SMESH_subMeshEventListenerData
Data specific for EventListener and to be stored in a submesh.
Definition:
SMESH_subMeshEventListener.hxx:74
SMESH_subMeshEventListenerData::MakeData
static SMESH_subMeshEventListenerData * MakeData(SMESH_subMesh *dependentSM, const int type=0)
Create a default listener data.
Definition:
SMESH_subMeshEventListener.hxx:93
SMESH_subMeshEventListenerData::myType
int myType
to recognize data type
Definition:
SMESH_subMeshEventListener.hxx:77
SMESH_subMeshEventListener::IsDeletable
bool IsDeletable() const
Definition:
SMESH_subMeshEventListener.hxx:48
SMESH_subMeshEventListenerData::IsDeletable
bool IsDeletable() const
Definition:
SMESH_subMeshEventListener.hxx:82
SMESH_Hypothesis
Definition:
SMESH_Hypothesis.hxx:47
SMESH_SMESH.hxx
SMESH_subMeshEventListener::myIsDeletable
bool myIsDeletable
if true, it will be deleted by SMESH_subMesh
Definition:
SMESH_subMeshEventListener.hxx:45
SMESH_subMeshEventListenerData::SMESH_subMeshEventListenerData
SMESH_subMeshEventListenerData(bool isDeletable)
Definition:
SMESH_subMeshEventListener.hxx:81
SMESH_subMeshEventListenerData::mySubMeshes
std::list< SMESH_subMesh * > mySubMeshes
generally: submeshes depending
Definition:
SMESH_subMeshEventListener.hxx:78
SMESH_EXPORT
#define SMESH_EXPORT
Definition:
SMESH_SMESH.hxx:36
inc
SMESH_subMeshEventListener.hxx
Generated by
1.8.17