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