blob: e40c356b589c62f1e83cb4e9f0cc078d4326700b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
// File: ShapeExtend_MsgRegistrator.cxx
// Created: Mon Jan 31 13:20:23 2000
// Author: data exchange team
// <det@kinox>
#include <ShapeExtend_MsgRegistrator.ixx>
#include <Message_ListOfMsg.hxx>
//=======================================================================
//function : ShapeExtend_MsgRegistrator
//purpose :
//=======================================================================
ShapeExtend_MsgRegistrator::ShapeExtend_MsgRegistrator() : ShapeExtend_BasicMsgRegistrator()
{
}
//=======================================================================
//function : Send
//purpose :
//=======================================================================
void ShapeExtend_MsgRegistrator::Send(const Handle(Standard_Transient)& object,
const Message_Msg& message,
const Message_Gravity)
{
if (object.IsNull()) {
#ifdef DEB
cout << "Warning: ShapeExtend_MsgRegistrator::Send: null object" << endl;
#endif
return;
}
if (myMapTransient.IsBound (object)) {
Message_ListOfMsg& list = myMapTransient.ChangeFind (object);
list.Append (message);
}
else {
Message_ListOfMsg list;
list.Append (message);
myMapTransient.Bind (object, list);
}
}
//=======================================================================
//function : Send
//purpose :
//=======================================================================
void ShapeExtend_MsgRegistrator::Send(const TopoDS_Shape& shape,
const Message_Msg& message,
const Message_Gravity)
{
if (shape.IsNull()) {
#ifdef DEB
cout << "Warning: ShapeExtend_MsgRegistrator::Send: null shape" << endl;
#endif
return;
}
if (myMapShape.IsBound (shape)) {
Message_ListOfMsg& list = myMapShape.ChangeFind (shape);
list.Append (message);
}
else {
Message_ListOfMsg list;
list.Append (message);
myMapShape.Bind (shape, list);
}
}
|