Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:17:55

0001 // Copyright (c) 2020 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _Message_AttributeObject_HeaderFile
0015 #define _Message_AttributeObject_HeaderFile
0016 
0017 #include <Message_Attribute.hxx>
0018 #include <TCollection_AsciiString.hxx>
0019 #include <NCollection_DefineAlloc.hxx>
0020 
0021 //! Alert object storing a transient object
0022 class Message_AttributeObject : public Message_Attribute
0023 {
0024   DEFINE_STANDARD_RTTIEXT(Message_AttributeObject, Message_Attribute)
0025 public:
0026   //! Constructor with string argument
0027   Standard_EXPORT Message_AttributeObject(
0028     const occ::handle<Standard_Transient>& theObject,
0029     const TCollection_AsciiString&         theName = TCollection_AsciiString::EmptyString());
0030 
0031   //! Returns object
0032   //! @return the object instance
0033   const occ::handle<Standard_Transient>& Object() const { return myObject; }
0034 
0035   //! Sets the object
0036   //! @param theObject an instance
0037   void SetObject(const occ::handle<Standard_Transient>& theObject) { myObject = theObject; }
0038 
0039   //! Dumps the content of me into the stream
0040   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0041 
0042 private:
0043   occ::handle<Standard_Transient> myObject; //!< alert object
0044 };
0045 
0046 #endif // _Message_AttributeObject_HeaderFile