summaryrefslogtreecommitdiff
path: root/src/MDataStd/MDataStd_NameRetrievalDriver.cxx
blob: 438b940338443b7108df437fa6be69d5efae2adc (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
#include <MDataStd_NameRetrievalDriver.ixx>
#include <PDataStd_Name.hxx>
#include <TDataStd_Name.hxx>
#include <TCollection_ExtendedString.hxx>
#include <PCollection_HExtendedString.hxx>
#include <CDM_MessageDriver.hxx>
#include <CDM_MessageDriver.hxx>

MDataStd_NameRetrievalDriver::MDataStd_NameRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
{
}

Standard_Integer MDataStd_NameRetrievalDriver::VersionNumber() const
{ return 0; }

Handle(Standard_Type) MDataStd_NameRetrievalDriver::SourceType() const
{ return STANDARD_TYPE(PDataStd_Name); }

Handle(TDF_Attribute) MDataStd_NameRetrievalDriver::NewEmpty() const
{ return new TDataStd_Name (); }


#include <TCollection_AsciiString.hxx>
#include <TDF_Tool.hxx>
#include <TDF_Label.hxx>

#define BUGOCC425

void MDataStd_NameRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,const Handle(TDF_Attribute)& Target,const Handle(MDF_RRelocationTable)& ) const
{
  Handle(PDataStd_Name) S = Handle(PDataStd_Name)::DownCast (Source);
  Handle(TDataStd_Name) T = Handle(TDataStd_Name)::DownCast (Target);
#ifdef BUGOCC425
  if(!S->Get().IsNull()) {
#endif 
    TCollection_ExtendedString Name = (S->Get())->Convert ();
    T->Set (Name);
#ifdef BUGOCC425
  }
#endif 
}