blob: 74f06c0666d512f06ce4385c29be15e3a68e130b (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
// File: MDataStd_UAttributeStorageDriver.cxx
// Created: FriJun 11 16:29:04 1999
// Author: Sergey RUIN
#include <MDataStd_UAttributeStorageDriver.ixx>
#include <PDataStd_UAttribute.hxx>
#include <TDataStd_UAttribute.hxx>
#include <MDataStd.hxx>
#include <TCollection_ExtendedString.hxx>
#include <PCollection_HExtendedString.hxx>
#include <CDM_MessageDriver.hxx>
//=======================================================================
//function : MDataStd_UAttributeStorageDriver
//purpose :
//=======================================================================
MDataStd_UAttributeStorageDriver::MDataStd_UAttributeStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ASDriver(theMsgDriver)
{}
//=======================================================================
//function : VersionNumber
//purpose :
//=======================================================================
Standard_Integer MDataStd_UAttributeStorageDriver::VersionNumber() const
{ return 0; }
//=======================================================================
//function : SourceType
//purpose :
//=======================================================================
Handle(Standard_Type) MDataStd_UAttributeStorageDriver::SourceType() const
{
static Handle(Standard_Type) sourceType = STANDARD_TYPE(TDataStd_UAttribute);
return sourceType;
}
//=======================================================================
//function : NewEmpty
//purpose :
//=======================================================================
Handle(PDF_Attribute) MDataStd_UAttributeStorageDriver::NewEmpty () const {
return new PDataStd_UAttribute ();
}
//=======================================================================
//function : Paste
//purpose :
//=======================================================================
void MDataStd_UAttributeStorageDriver::Paste (
const Handle(TDF_Attribute)& Source,
const Handle(PDF_Attribute)& Target,
// const Handle(MDF_SRelocationTable)& RelocTable) const
const Handle(MDF_SRelocationTable)& ) const
{
Handle(TDataStd_UAttribute) S = Handle(TDataStd_UAttribute)::DownCast (Source);
Handle(PDataStd_UAttribute) T = Handle(PDataStd_UAttribute)::DownCast (Target);
TCollection_ExtendedString extstr("00000000-0000-0000-0000-000000000000"); //covert GUID into ExtendedString
Standard_PExtCharacter pStr=(Standard_PExtCharacter)extstr.ToExtString();
S->ID().ToExtString( pStr );
Handle(PCollection_HExtendedString) guid = new PCollection_HExtendedString ( extstr );
T->SetID ( guid );
}
|