0025923: Remove small wires on face read from STEP
[occt.git] / src / MDataStd / MDataStd_RealStorageDriver.cxx
CommitLineData
b311480e 1// Created on: 1997-04-10
2// Created by: VAUTHIER Jean-Claude
3// Copyright (c) 1997-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
17#include <MDataStd_RealStorageDriver.ixx>
18#include <PDataStd_Real.hxx>
19#include <TDataStd_Real.hxx>
20#include <MDataStd.hxx>
21#include <TDataStd_RealEnum.hxx>
22#include <CDM_MessageDriver.hxx>
23
24
25//=======================================================================
26//function : MDataStd_RealStorageDriver
27//purpose :
28//=======================================================================
29
30MDataStd_RealStorageDriver::MDataStd_RealStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ASDriver(theMsgDriver)
31{}
32
33
34//=======================================================================
35//function : VersionNumber
36//purpose :
37//=======================================================================
38
39Standard_Integer MDataStd_RealStorageDriver::VersionNumber() const
40{ return 0; }
41
42
43//=======================================================================
44//function : SourceType
45//purpose :
46//=======================================================================
47
48Handle(Standard_Type) MDataStd_RealStorageDriver::SourceType() const
49{
50 static Handle(Standard_Type) sourceType = STANDARD_TYPE(TDataStd_Real);
51 return sourceType;
52}
53
54
55//=======================================================================
56//function : NewEmpty
57//purpose :
58//=======================================================================
59
60Handle(PDF_Attribute) MDataStd_RealStorageDriver::NewEmpty () const {
61
62 return new PDataStd_Real ();
63}
64
65
66//=======================================================================
67//function : Paste
68//purpose :
69//=======================================================================
70
71void MDataStd_RealStorageDriver::Paste (
72 const Handle(TDF_Attribute)& Source,
73 const Handle(PDF_Attribute)& Target,
74// const Handle(MDF_SRelocationTable)& RelocTable) const
75 const Handle(MDF_SRelocationTable)& ) const
76{
77 Handle(TDataStd_Real) S = Handle(TDataStd_Real)::DownCast (Source);
78 Handle(PDataStd_Real) T = Handle(PDataStd_Real)::DownCast (Target);
79 T->Set (S->Get ());
80 T->SetDimension (MDataStd::RealDimensionToInteger(S->GetDimension()));
81}
82