8c7fab9b |
1 | // Copyright (c) 2017-2018 OPEN CASCADE SAS |
024d6f77 |
2 | // |
3 | // This file is part of Open CASCADE Technology software library. |
4 | // |
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. |
10 | // |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
13 | |
14 | #ifndef _XCAFDoc_NoteBalloon_HeaderFile |
15 | #define _XCAFDoc_NoteBalloon_HeaderFile |
16 | |
17 | #include <XCAFDoc_NoteComment.hxx> |
18 | |
024d6f77 |
19 | //! A comment note attribute. |
20 | //! Contains a textual comment. |
21 | class XCAFDoc_NoteBalloon : public XCAFDoc_NoteComment |
22 | { |
23 | public: |
24 | |
25 | DEFINE_STANDARD_RTTIEXT(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment) |
26 | |
8c7fab9b |
27 | //! Returns default attribute GUID |
024d6f77 |
28 | Standard_EXPORT static const Standard_GUID& GetID(); |
29 | |
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); |
32 | |
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); |
42 | |
43 | //! Creates an empty comment note. |
44 | Standard_EXPORT XCAFDoc_NoteBalloon(); |
45 | |
46 | public: |
47 | |
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; |
51 | |
52 | }; |
53 | |
8c7fab9b |
54 | DEFINE_STANDARD_HANDLE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment) |
55 | |
024d6f77 |
56 | #endif // _XCAFDoc_NoteBalloon_HeaderFile |