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.
14 #include <StdPersistent_DataXtd_PatternStd.hxx>
16 #include <TNaming_NamedShape.hxx>
17 #include <TDataStd_Real.hxx>
18 #include <TDataStd_Integer.hxx>
21 //=======================================================================
23 //purpose : Import transient attribuite from the persistent data
24 //=======================================================================
25 void StdPersistent_DataXtd_PatternStd::Import
26 (const Handle(TDataXtd_PatternStd)& theAttribute) const
28 theAttribute->Signature (mySignature);
29 theAttribute->Axis1Reversed (myAxis1Reversed);
30 theAttribute->Axis2Reversed (myAxis2Reversed);
35 Handle(TNaming_NamedShape)::DownCast (myAxis1->GetAttribute()));
37 theAttribute->Value1 (
38 Handle(TDataStd_Real)::DownCast (myValue1->GetAttribute()));
40 theAttribute->NbInstances1 (
41 Handle(TDataStd_Integer)::DownCast (myNb1->GetAttribute()));
46 Handle(TNaming_NamedShape)::DownCast (myAxis2->GetAttribute()));
48 theAttribute->Value2 (
49 Handle(TDataStd_Real)::DownCast (myValue2->GetAttribute()));
51 theAttribute->NbInstances2 (
52 Handle(TDataStd_Integer)::DownCast (myNb2->GetAttribute()));
57 theAttribute->Mirror (
58 Handle(TNaming_NamedShape)::DownCast (myMirror->GetAttribute()));