Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:23

0001 // Created on: 2017-06-27
0002 // Created by: Andrey Betenev
0003 // Copyright (c) 2017 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _TopoDS_AlertWithShape_HeaderFile
0017 #define _TopoDS_AlertWithShape_HeaderFile
0018 
0019 #include <Message_Alert.hxx>
0020 #include <TopoDS_Shape.hxx>
0021 
0022 //! Alert object storing TopoDS shape in its field
0023 class TopoDS_AlertWithShape : public Message_Alert 
0024 {
0025 public:
0026   //! Constructor with shape argument
0027   Standard_EXPORT TopoDS_AlertWithShape (const TopoDS_Shape& theShape);
0028 
0029   //! Returns contained shape
0030   const TopoDS_Shape& GetShape() const { return myShape; }
0031 
0032   //! Sets the shape
0033   void SetShape(const TopoDS_Shape& theShape) { myShape = theShape; }
0034 
0035   //! Returns false.
0036   virtual Standard_EXPORT Standard_Boolean SupportsMerge () const Standard_OVERRIDE;
0037 
0038   //! Returns false.
0039   virtual Standard_EXPORT Standard_Boolean Merge (const Handle(Message_Alert)& theTarget) Standard_OVERRIDE;
0040 
0041   // OCCT RTTI
0042   DEFINE_STANDARD_RTTIEXT(TopoDS_AlertWithShape, Message_Alert)
0043 
0044 private:
0045   TopoDS_Shape myShape;
0046 };
0047 
0048 //! Helper macro allowing to define alert with shape argument in one line of code
0049 #define DEFINE_ALERT_WITH_SHAPE(Alert) \
0050   class Alert : public TopoDS_AlertWithShape \
0051   { \
0052   public:\
0053     Alert (const TopoDS_Shape& theShape) : TopoDS_AlertWithShape(theShape) {} \
0054     DEFINE_STANDARD_RTTI_INLINE(Alert, TopoDS_AlertWithShape) \
0055   };
0056 
0057 #endif // _TopoDS_AlertWithShape_HeaderFile