1 // Copyright (c) 2015 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.
15 #ifndef _StdLPersistent_Value_HeaderFile
16 #define _StdLPersistent_Value_HeaderFile
18 #include <StdObjMgt_Attribute.hxx>
19 #include <StdLPersistent_HString.hxx>
21 #include <TDataStd_Integer.hxx>
22 #include <TDF_TagSource.hxx>
23 #include <TDF_Reference.hxx>
24 #include <TDataStd_UAttribute.hxx>
25 #include <TDataStd_Name.hxx>
26 #include <TDataStd_Comment.hxx>
27 #include <TDataStd_AsciiString.hxx>
30 class StdLPersistent_Value
32 template <class AttribClass>
33 class integer : public StdObjMgt_Attribute<AttribClass>::SingleInt
36 //! Import transient attribuite from the persistent data.
37 Standard_EXPORT virtual void ImportAttribute();
40 template <class AttribClass,
41 class HStringClass = StdLPersistent_HString::Extended>
42 class string : public StdObjMgt_Attribute<AttribClass>::SingleRef
45 //! Import transient attribuite from the persistent data.
46 Standard_EXPORT virtual void ImportAttribute();
51 class TagSource : public integer <TDF_TagSource> {
53 Standard_CString PName() const { return "PDF_TagSource"; }
56 class Reference : public string <TDF_Reference> {
58 Standard_CString PName() const { return "PDF_Reference"; }
61 class Comment : public string <TDataStd_Comment> {
63 Standard_CString PName() const { return "PDF_Comment"; }
66 class UAttribute : public string <TDataStd_UAttribute>
69 //! Create an empty transient attribuite
70 Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
71 Standard_CString PName() const { return "PDataStd_UAttribute"; }
74 class Integer : public integer <TDataStd_Integer>
77 //! Create an empty transient attribuite
78 Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
79 Standard_CString PName() const { return "PDataStd_Integer"; }
82 class Name : public string <TDataStd_Name>
85 //! Create an empty transient attribuite
86 Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
87 Standard_CString PName() const { return "PDataStd_Name"; }
90 class AsciiString : public string <TDataStd_AsciiString, StdLPersistent_HString::Ascii>
93 //! Create an empty transient attribuite
94 Standard_EXPORT virtual Handle(TDF_Attribute) CreateAttribute();
95 Standard_CString PName() const { return "PDataStd_AsciiString"; }
101 inline Standard_CString StdObjMgt_Attribute<TDF_TagSource>::Simple<Standard_Integer>::PName() const
102 { return "PDF_TagSource"; }
106 inline Standard_CString StdObjMgt_Attribute<TDF_Reference>::Simple<Handle(StdObjMgt_Persistent)>::PName() const
107 { return "PDF_Reference"; }
111 inline Standard_CString StdObjMgt_Attribute<TDataStd_Comment>::Simple<Handle(StdObjMgt_Persistent)>::PName() const
112 { return "PDataStd_Comment"; }