1 // Created on: 2000-01-31
2 // Created by: data exchange team
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <ShapeExtend_MsgRegistrator.ixx>
17 #include <Message_ListOfMsg.hxx>
19 //=======================================================================
20 //function : ShapeExtend_MsgRegistrator
22 //=======================================================================
24 ShapeExtend_MsgRegistrator::ShapeExtend_MsgRegistrator() : ShapeExtend_BasicMsgRegistrator()
28 //=======================================================================
31 //=======================================================================
33 void ShapeExtend_MsgRegistrator::Send(const Handle(Standard_Transient)& object,
34 const Message_Msg& message,
35 const Message_Gravity)
37 if (object.IsNull()) {
39 cout << "Warning: ShapeExtend_MsgRegistrator::Send: null object" << endl;
43 if (myMapTransient.IsBound (object)) {
44 Message_ListOfMsg& list = myMapTransient.ChangeFind (object);
45 list.Append (message);
48 Message_ListOfMsg list;
49 list.Append (message);
50 myMapTransient.Bind (object, list);
54 //=======================================================================
57 //=======================================================================
59 void ShapeExtend_MsgRegistrator::Send(const TopoDS_Shape& shape,
60 const Message_Msg& message,
61 const Message_Gravity)
65 cout << "Warning: ShapeExtend_MsgRegistrator::Send: null shape" << endl;
69 if (myMapShape.IsBound (shape)) {
70 Message_ListOfMsg& list = myMapShape.ChangeFind (shape);
71 list.Append (message);
74 Message_ListOfMsg list;
75 list.Append (message);
76 myMapShape.Bind (shape, list);