0024624: Lost word in license statement in source files
[occt.git] / src / ShapeExtend / ShapeExtend_MsgRegistrator.cxx
1 // Created on: 2000-01-31
2 // Created by: data exchange team
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
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.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <ShapeExtend_MsgRegistrator.ixx>
17 #include <Message_ListOfMsg.hxx>
18
19 //=======================================================================
20 //function : ShapeExtend_MsgRegistrator
21 //purpose  : 
22 //=======================================================================
23
24 ShapeExtend_MsgRegistrator::ShapeExtend_MsgRegistrator() : ShapeExtend_BasicMsgRegistrator()
25 {
26 }
27
28 //=======================================================================
29 //function : Send
30 //purpose  : 
31 //=======================================================================
32
33 void ShapeExtend_MsgRegistrator::Send(const Handle(Standard_Transient)& object,
34                                       const Message_Msg& message,
35                                       const Message_Gravity) 
36 {
37   if (object.IsNull()) {
38 #ifdef DEB
39     cout << "Warning: ShapeExtend_MsgRegistrator::Send: null object" << endl;
40 #endif
41     return;
42   }
43   if (myMapTransient.IsBound (object)) {
44     Message_ListOfMsg& list = myMapTransient.ChangeFind (object);
45     list.Append (message);
46   }
47   else {
48     Message_ListOfMsg list;
49     list.Append (message);
50     myMapTransient.Bind (object, list);
51   }
52 }
53
54 //=======================================================================
55 //function : Send
56 //purpose  : 
57 //=======================================================================
58
59  void ShapeExtend_MsgRegistrator::Send(const TopoDS_Shape& shape,
60                                        const Message_Msg& message,
61                                        const Message_Gravity) 
62 {
63   if (shape.IsNull()) {
64 #ifdef DEB
65     cout << "Warning: ShapeExtend_MsgRegistrator::Send: null shape" << endl;
66 #endif
67     return;
68   }
69   if (myMapShape.IsBound (shape)) {
70     Message_ListOfMsg& list = myMapShape.ChangeFind (shape);
71     list.Append (message);
72   }
73   else {
74     Message_ListOfMsg list;
75     list.Append (message);
76     myMapShape.Bind (shape, list);
77   }
78 }
79