0030773: Application Framework - To allow to inherit existing attributes to reuse...
[occt.git] / src / XCAFDoc / XCAFDoc_NoteBalloon.hxx
CommitLineData
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.
21class XCAFDoc_NoteBalloon : public XCAFDoc_NoteComment
22{
23public:
24
c99ad5d7 25 DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
024d6f77 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
46public:
47
48 // Overrides TDF_Attribute virtuals
49 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
024d6f77 50};
51
8c7fab9b 52DEFINE_STANDARD_HANDLE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
53
024d6f77 54#endif // _XCAFDoc_NoteBalloon_HeaderFile