Test for 0022778: Bug in BRepMesh
[occt.git] / src / MDataStd / MDataStd_RealListRetrievalDriver.cxx
CommitLineData
b311480e 1// Created on: 2007-05-29
2// Created by: Vlad Romashko
3// Copyright (c) 2007-2012 OPEN CASCADE SAS
4//
5// The content of this file is subject to the Open CASCADE Technology Public
6// License Version 6.5 (the "License"). You may not use the content of this file
7// except in compliance with the License. Please obtain a copy of the License
8// at http://www.opencascade.org and read it completely before using this file.
9//
10// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12//
13// The Original Code and all software distributed under the License is
14// distributed on an "AS IS" basis, without warranty of any kind, and the
15// Initial Developer hereby disclaims all such warranties, including without
16// limitation, any warranties of merchantability, fitness for a particular
17// purpose or non-infringement. Please see the License for the specific terms
18// and conditions governing the rights and limitations under the License.
19
7fd59977 20
21#include <MDataStd_RealListRetrievalDriver.ixx>
22#include <PDataStd_RealList.hxx>
23#include <TDataStd_RealList.hxx>
24#include <MDataStd.hxx>
25#include <CDM_MessageDriver.hxx>
26
27//=======================================================================
28//function : MDataStd_RealListRetrievalDriver
29//purpose :
30//=======================================================================
31MDataStd_RealListRetrievalDriver::MDataStd_RealListRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
32{
33
34}
35
36//=======================================================================
37//function : VersionNumber
38//purpose :
39//=======================================================================
40Standard_Integer MDataStd_RealListRetrievalDriver::VersionNumber() const
41{
42 return 0;
43}
44
45//=======================================================================
46//function : SourceType
47//purpose :
48//=======================================================================
49Handle(Standard_Type) MDataStd_RealListRetrievalDriver::SourceType() const
50{
51 static Handle(Standard_Type) sourceType = STANDARD_TYPE(PDataStd_RealList);
52 return sourceType;
53}
54
55//=======================================================================
56//function : NewEmpty
57//purpose :
58//=======================================================================
59Handle(TDF_Attribute) MDataStd_RealListRetrievalDriver::NewEmpty () const
60{
61 return new TDataStd_RealList();
62}
63
64//=======================================================================
65//function : Paste
66//purpose :
67//=======================================================================
68void MDataStd_RealListRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
69 const Handle(TDF_Attribute)& Target,
70 const Handle(MDF_RRelocationTable)& ) const
71{
72 Handle(PDataStd_RealList) S = Handle(PDataStd_RealList)::DownCast (Source);
73 Handle(TDataStd_RealList) T = Handle(TDataStd_RealList)::DownCast (Target);
74
75 Standard_Integer i, lower = S->Lower(), upper = S->Upper();
76 for (i = lower; i <= upper; i++)
77 {
78 T->Append(S->Value(i));
79 }
80}