1 // Copyright (c) 2017-2018 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _XCAFDoc_NoteBalloon_HeaderFile
15 #define _XCAFDoc_NoteBalloon_HeaderFile
17 #include <XCAFDoc_NoteComment.hxx>
19 //! A comment note attribute.
20 //! Contains a textual comment.
21 class XCAFDoc_NoteBalloon : public XCAFDoc_NoteComment
25 DEFINE_STANDARD_RTTIEXT(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
27 //! Returns default attribute GUID
28 Standard_EXPORT static const Standard_GUID& GetID();
30 //! Finds a reference attribute on the given label and returns it, if it is found
31 Standard_EXPORT static Handle(XCAFDoc_NoteBalloon) Get(const TDF_Label& theLabel);
33 //! Create (if not exist) a comment note on the given label.
34 //! \param [in] theLabel - note label.
35 //! \param [in] theUserName - the name of the user, who created the note.
36 //! \param [in] theTimeStamp - creation timestamp of the note.
37 //! \param [in] theComment - comment text.
38 Standard_EXPORT static Handle(XCAFDoc_NoteBalloon) Set(const TDF_Label& theLabel,
39 const TCollection_ExtendedString& theUserName,
40 const TCollection_ExtendedString& theTimeStamp,
41 const TCollection_ExtendedString& theComment);
43 //! Creates an empty comment note.
44 Standard_EXPORT XCAFDoc_NoteBalloon();
48 // Overrides TDF_Attribute virtuals
49 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
50 Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
54 DEFINE_STANDARD_HANDLE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
56 #endif // _XCAFDoc_NoteBalloon_HeaderFile