1 // Created on: 2000-01-28
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 #ifndef _ShapeExtend_MsgRegistrator_HeaderFile
17 #define _ShapeExtend_MsgRegistrator_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
22 #include <ShapeExtend_DataMapOfTransientListOfMsg.hxx>
23 #include <ShapeExtend_DataMapOfShapeListOfMsg.hxx>
24 #include <ShapeExtend_BasicMsgRegistrator.hxx>
25 #include <Message_Gravity.hxx>
26 class Standard_Transient;
31 class ShapeExtend_MsgRegistrator;
32 DEFINE_STANDARD_HANDLE(ShapeExtend_MsgRegistrator, ShapeExtend_BasicMsgRegistrator)
34 //! Attaches messages to the objects (generic Transient or shape).
35 //! The objects of this class are transmitted to the Shape Healing
36 //! algorithms so that they could collect messages occurred during
39 //! Messages are added to the Maps (stored as a field) that can be
40 //! used, for instance, by Data Exchange processors to attach those
41 //! messages to initial file entities.
42 class ShapeExtend_MsgRegistrator : public ShapeExtend_BasicMsgRegistrator
48 //! Creates an object.
49 Standard_EXPORT ShapeExtend_MsgRegistrator();
51 //! Sends a message to be attached to the object.
52 //! If the object is in the map then the message is added to the
53 //! list, otherwise the object is firstly added to the map.
54 Standard_EXPORT virtual void Send (const Handle(Standard_Transient)& object, const Message_Msg& message, const Message_Gravity gravity) Standard_OVERRIDE;
56 //! Sends a message to be attached to the shape.
57 //! If the shape is in the map then the message is added to the
58 //! list, otherwise the shape is firstly added to the map.
59 Standard_EXPORT virtual void Send (const TopoDS_Shape& shape, const Message_Msg& message, const Message_Gravity gravity) Standard_OVERRIDE;
61 //! Returns a Map of objects and message list
62 const ShapeExtend_DataMapOfTransientListOfMsg& MapTransient() const;
64 //! Returns a Map of shapes and message list
65 const ShapeExtend_DataMapOfShapeListOfMsg& MapShape() const;
70 DEFINE_STANDARD_RTTIEXT(ShapeExtend_MsgRegistrator,ShapeExtend_BasicMsgRegistrator)
80 ShapeExtend_DataMapOfTransientListOfMsg myMapTransient;
81 ShapeExtend_DataMapOfShapeListOfMsg myMapShape;
87 #include <ShapeExtend_MsgRegistrator.lxx>
93 #endif // _ShapeExtend_MsgRegistrator_HeaderFile