Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 09:21:39

0001 // Created on: 2018-06-10
0002 // Created by: Natalia Ermolaeva
0003 // Copyright (c) 2018-2020 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_AlertAttribute_HeaderFile
0017 #define _TopoDS_AlertAttribute_HeaderFile
0018 
0019 #include <Message_AttributeStream.hxx>
0020 #include <Message_Messenger.hxx>
0021 #include <Message_Report.hxx>
0022 #include <TCollection_AsciiString.hxx>
0023 
0024 #include <TopoDS_Shape.hxx>
0025 
0026 class Message_Messenger;
0027 
0028 //! Alert attribute object storing TopoDS shape in its field
0029 class TopoDS_AlertAttribute : public Message_AttributeStream
0030 {
0031   DEFINE_STANDARD_RTTIEXT(TopoDS_AlertAttribute, Message_AttributeStream)
0032 public:
0033   //! Constructor with shape argument
0034   Standard_EXPORT TopoDS_AlertAttribute(
0035     const TopoDS_Shape&            theShape,
0036     const TCollection_AsciiString& theName = TCollection_AsciiString::EmptyString());
0037 
0038   //! Returns contained shape
0039   const TopoDS_Shape& GetShape() const { return myShape; }
0040 
0041 public:
0042   //! Push shape information into messenger
0043   Standard_EXPORT static void Send(const occ::handle<Message_Messenger>& theMessenger,
0044                                    const TopoDS_Shape&                   theShape);
0045 
0046   //! Dumps the content of me into the stream
0047   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0048 
0049 private:
0050   TopoDS_Shape myShape;
0051 };
0052 
0053 inline const occ::handle<Message_Messenger>& operator<<(
0054   const occ::handle<Message_Messenger>& theMessenger,
0055   const TopoDS_Shape&                   theShape)
0056 {
0057   TopoDS_AlertAttribute::Send(theMessenger, theShape);
0058   return theMessenger;
0059 }
0060 
0061 #endif // _TopoDS_AlertAttribute_HeaderFile