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 <StdLPersistent_Dependency.hxx>
17 static void ImportName (const Handle(TDataStd_Expression)& theAttribute,
18 const TCollection_ExtendedString& theName)
19 { theAttribute->SetExpression (theName); }
21 static void ImportName (const Handle(TDataStd_Relation)& theAttribute,
22 const TCollection_ExtendedString& theName)
23 { theAttribute->SetRelation (theName); }
26 //=======================================================================
28 //purpose : Import transient attribute from the persistent data
29 //=======================================================================
30 template <class AttribClass>
31 void StdLPersistent_Dependency::instance<AttribClass>::Import
32 (const Handle(AttribClass)& theAttribute) const
35 ImportName (theAttribute, myName->Value()->String());
39 StdLPersistent_HArray1OfPersistent::Iterator anIter (*myVariables->Array());
40 for (; anIter.More(); anIter.Next())
42 const Handle(StdObjMgt_Persistent) aPersistent = anIter.Value();
44 theAttribute->GetVariables().Append (aPersistent->GetAttribute());
50 template class StdLPersistent_Dependency::instance<TDataStd_Expression>;
51 template class StdLPersistent_Dependency::instance<TDataStd_Relation>;