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