1 // Created on: 1999-06-15
2 // Created by: Sergey RUIN
3 // Copyright (c) 1999-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <MDataStd_UAttributeRetrievalDriver.ixx>
18 #include <PDataStd_UAttribute.hxx>
19 #include <TDataStd_UAttribute.hxx>
20 #include <MDataStd.hxx>
21 #include <TCollection_ExtendedString.hxx>
22 #include <PCollection_HExtendedString.hxx>
23 #include <CDM_MessageDriver.hxx>
25 //=======================================================================
26 //function : MDataStd_UAttributeRetrievalDriver
28 //=======================================================================
30 MDataStd_UAttributeRetrievalDriver::MDataStd_UAttributeRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
34 //=======================================================================
35 //function : VersionNumber
37 //=======================================================================
39 Standard_Integer MDataStd_UAttributeRetrievalDriver::VersionNumber() const
43 //=======================================================================
44 //function : SourceType
46 //=======================================================================
48 Handle(Standard_Type) MDataStd_UAttributeRetrievalDriver::SourceType() const
50 static Handle(Standard_Type) sourceType = STANDARD_TYPE(PDataStd_UAttribute);
55 //=======================================================================
58 //=======================================================================
60 Handle(TDF_Attribute) MDataStd_UAttributeRetrievalDriver::NewEmpty () const {
62 return new TDataStd_UAttribute ();
66 //=======================================================================
69 //=======================================================================
71 void MDataStd_UAttributeRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
72 const Handle(TDF_Attribute)& Target,
73 const Handle(MDF_RRelocationTable)& /*RelocTable*/) const
75 Handle(PDataStd_UAttribute) S = Handle(PDataStd_UAttribute)::DownCast (Source);
76 Handle(TDataStd_UAttribute) T = Handle(TDataStd_UAttribute)::DownCast (Target);
78 TCollection_ExtendedString extstr = (S->GetID())->Convert();
79 Standard_GUID guid( extstr.ToExtString() );