1 // File: MXCAFDoc_ColorStorageDriver.cxx
2 // Created: Tue Aug 15 15:32:19 2000
3 // Author: data exchange team
4 // <det@strelox.nnov.matra-dtv.fr>
7 #include <MDF_SRelocationTable.hxx>
8 #include <MXCAFDoc_ColorStorageDriver.ixx>
9 #include <MgtTopLoc.hxx>
10 #include <PTColStd_TransientPersistentMap.hxx>
11 #include <PXCAFDoc_Color.hxx>
12 #include <XCAFDoc_Color.hxx>
14 //=======================================================================
15 //function : Constructor
17 //=======================================================================
19 MXCAFDoc_ColorStorageDriver::MXCAFDoc_ColorStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver) : MDF_ASDriver (theMsgDriver)
23 //=======================================================================
24 //function : VersionNumber
26 //=======================================================================
28 Standard_Integer MXCAFDoc_ColorStorageDriver::VersionNumber() const
31 //=======================================================================
32 //function : SourceType
34 //=======================================================================
36 Handle(Standard_Type) MXCAFDoc_ColorStorageDriver::SourceType() const
38 static Handle(Standard_Type) sourceType = STANDARD_TYPE(XCAFDoc_Color);
42 //=======================================================================
45 //=======================================================================
47 Handle(PDF_Attribute) MXCAFDoc_ColorStorageDriver::NewEmpty() const
49 return new PXCAFDoc_Color();
52 //=======================================================================
55 //=======================================================================
57 void MXCAFDoc_ColorStorageDriver::Paste(const Handle(TDF_Attribute)& Source,
58 const Handle(PDF_Attribute)& Target,
59 const Handle(MDF_SRelocationTable)& //RelocTable
62 Handle(XCAFDoc_Color) S = Handle(XCAFDoc_Color)::DownCast (Source);
63 Handle(PXCAFDoc_Color) T = Handle(PXCAFDoc_Color)::DownCast (Target);
65 T->Set(S->GetColor());