1 // Created on: 2007-05-29
2 // Created by: Vlad Romashko
3 // Copyright (c) 2007-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <MDataStd_BooleanListRetrievalDriver.ixx>
17 #include <PDataStd_BooleanList.hxx>
18 #include <TDataStd_BooleanList.hxx>
19 #include <MDataStd.hxx>
20 #include <CDM_MessageDriver.hxx>
22 //=======================================================================
23 //function : MDataStd_BooleanListRetrievalDriver
25 //=======================================================================
26 MDataStd_BooleanListRetrievalDriver::MDataStd_BooleanListRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
31 //=======================================================================
32 //function : VersionNumber
34 //=======================================================================
35 Standard_Integer MDataStd_BooleanListRetrievalDriver::VersionNumber() const
40 //=======================================================================
41 //function : SourceType
43 //=======================================================================
44 Handle(Standard_Type) MDataStd_BooleanListRetrievalDriver::SourceType() const
46 static Handle(Standard_Type) sourceType = STANDARD_TYPE(PDataStd_BooleanList);
50 //=======================================================================
53 //=======================================================================
54 Handle(TDF_Attribute) MDataStd_BooleanListRetrievalDriver::NewEmpty () const
56 return new TDataStd_BooleanList();
59 //=======================================================================
62 //=======================================================================
63 void MDataStd_BooleanListRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
64 const Handle(TDF_Attribute)& Target,
65 const Handle(MDF_RRelocationTable)& ) const
67 const Handle(PDataStd_BooleanList) S = Handle(PDataStd_BooleanList)::DownCast (Source);
68 const Handle(TDataStd_BooleanList) T = Handle(TDataStd_BooleanList)::DownCast (Target);
70 Standard_Integer i, lower = S->Lower(), upper = S->Upper();
72 for (i = lower; i <= upper; i++) {
73 T->Append(S->Value(i));