blob: 9553ac0df9e36cf09e868bfcada5bb8410e59bd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// File : BinMDF_TagSourceDriver.cxx
// Created : Tue Nov 19 12:05:04 2002
// Author : Edward AGAPOV (eap)
// Copyright : Open CASCADE
#include <BinMDF_TagSourceDriver.ixx>
#include <TDF_TagSource.hxx>
//=======================================================================
//function : BinMDF_TagSourceDriver
//purpose : Constructor
//=======================================================================
BinMDF_TagSourceDriver::BinMDF_TagSourceDriver
(const Handle(CDM_MessageDriver)& theMsgDriver)
: BinMDF_ADriver (theMsgDriver, NULL)
{}
//=======================================================================
//function : NewEmpty
//purpose :
//=======================================================================
Handle(TDF_Attribute) BinMDF_TagSourceDriver::NewEmpty() const
{
return (new TDF_TagSource());
}
//=======================================================================
//function : Paste
//purpose : persistent -> transient (retrieve)
//=======================================================================
Standard_Boolean BinMDF_TagSourceDriver::Paste
(const BinObjMgt_Persistent& theSource,
const Handle(TDF_Attribute)& theTarget,
BinObjMgt_RRelocationTable& ) const
{
Handle(TDF_TagSource) aTag = Handle(TDF_TagSource)::DownCast(theTarget);
Standard_Integer aValue=0;
Standard_Boolean ok = theSource >> aValue;
if (ok)
aTag->Set(aValue);
return ok;
}
//=======================================================================
//function : Paste
//purpose : transient -> persistent (store)
//=======================================================================
void BinMDF_TagSourceDriver::Paste (const Handle(TDF_Attribute)& theSource,
BinObjMgt_Persistent& theTarget,
BinObjMgt_SRelocationTable& ) const
{
Handle(TDF_TagSource) aTag = Handle(TDF_TagSource)::DownCast(theSource);
theTarget << aTag->Get();
}
|