|
|
|||
File indexing completed on 2026-09-21 09:17:51
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_Attribute_HeaderFile 0015 #define _Message_Attribute_HeaderFile 0016 0017 #include <Standard_Transient.hxx> 0018 #include <NCollection_DefineAlloc.hxx> 0019 #include <TCollection_AsciiString.hxx> 0020 0021 //! Additional information of extended alert attribute 0022 //! To provide other custom attribute container, it might be redefined. 0023 class Message_Attribute : public Standard_Transient 0024 { 0025 DEFINE_STANDARD_RTTIEXT(Message_Attribute, Standard_Transient) 0026 public: 0027 //! Empty constructor 0028 Standard_EXPORT Message_Attribute( 0029 const TCollection_AsciiString& theName = TCollection_AsciiString::EmptyString()); 0030 0031 //! Return a C string to be used as a key for generating text user messages describing this alert. 0032 //! The messages are generated with help of Message_Msg class, in Message_Report::Dump(). 0033 //! Base implementation returns dynamic type name of the instance. 0034 Standard_EXPORT virtual const char* GetMessageKey() const; 0035 0036 //! Returns custom name of alert if it is set 0037 //! @return alert name 0038 const TCollection_AsciiString& GetName() const { return myName; } 0039 0040 //! Sets the custom name of alert 0041 //! @param theName a name for the alert 0042 void SetName(const TCollection_AsciiString& theName) { myName = theName; } 0043 0044 //! Dumps the content of me into the stream 0045 virtual Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const; 0046 0047 private: 0048 TCollection_AsciiString myName; //!< alert name, if defined is used in GetMessageKey 0049 }; 0050 0051 #endif // _Message_Attribute_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|