ff205346 |
1 | // Copyright (c) 2015 OPEN CASCADE SAS |
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 | |
15 | #ifndef _StdPersistent_PPrsStd_PatternStd_HeaderFile |
16 | #define _StdPersistent_PPrsStd_PatternStd_HeaderFile |
17 | |
18 | #include <StdObjMgt_Attribute.hxx> |
19 | #include <StdLPersistent_HString.hxx> |
20 | |
21 | #include <TDataXtd_Presentation.hxx> |
22 | |
23 | class StdPersistent_PPrsStd |
24 | { |
25 | public: |
26 | class AISPresentation : public StdObjMgt_Attribute<TDataXtd_Presentation> |
27 | { |
28 | public: |
29 | //! Read persistent data from a file. |
30 | inline void Read (StdObjMgt_ReadData& theReadData) |
31 | { |
32 | theReadData >> myIsDisplayed >> myDriverGUID |
33 | >> myTransparency >> myColor >> myMaterial >> myWidth; |
34 | } |
35 | |
36 | //! Import transient attribuite from the persistent data. |
37 | void Import (const Handle(TDataXtd_Presentation)& theAttribute) const; |
38 | |
39 | private: |
45d8465e |
40 | Standard_Boolean myIsDisplayed; |
41 | Handle(StdObjMgt_Persistent) myDriverGUID; |
42 | Standard_Real myTransparency; |
43 | Standard_Integer myColor; |
44 | Standard_Integer myMaterial; |
45 | Standard_Real myWidth; |
ff205346 |
46 | }; |
47 | |
48 | class AISPresentation_1 : public AISPresentation |
49 | { |
50 | public: |
51 | //! Read persistent data from a file. |
52 | inline void Read (StdObjMgt_ReadData& theReadData) |
53 | { |
54 | AISPresentation::Read (theReadData); |
55 | theReadData >> myMode; |
56 | } |
57 | |
58 | //! Import transient attribuite from the persistent data. |
59 | void Import (const Handle(TDataXtd_Presentation)& theAttribute) const; |
60 | |
61 | private: |
45d8465e |
62 | Standard_Integer myMode; |
ff205346 |
63 | }; |
64 | }; |
65 | |
66 | #endif |