0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / MFunction / MFunction_FunctionStorageDriver.cxx
1 // Created on: 1999-06-17
2 // Created by: Vladislav ROMASHKO
3 // Copyright (c) 1999-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and / or modify it
9 // under the terms of the GNU Lesser General Public version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <MFunction_FunctionStorageDriver.ixx>
18
19 #include <TFunction_Function.hxx>
20 #include <PFunction_Function.hxx>
21 #include <CDM_MessageDriver.hxx>
22 #include <Standard_NoSuchObject.hxx>
23
24 MFunction_FunctionStorageDriver::MFunction_FunctionStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ASDriver(theMsgDriver)
25 {}
26
27 Standard_Integer MFunction_FunctionStorageDriver::VersionNumber() const
28 { return 0; }
29
30 Handle(Standard_Type) MFunction_FunctionStorageDriver::SourceType() const
31 { return STANDARD_TYPE(TFunction_Function); }
32
33 Handle(PDF_Attribute) MFunction_FunctionStorageDriver::NewEmpty() const
34 { return new PFunction_Function(); }
35
36 void MFunction_FunctionStorageDriver::Paste(const Handle(TDF_Attribute)&        Source,
37                                             const Handle(PDF_Attribute)&        Target,
38 //                                          const Handle(MDF_SRelocationTable)& RelocTable) const
39                                             const Handle(MDF_SRelocationTable)& ) const
40 {
41   Handle(TFunction_Function) S = Handle(TFunction_Function)::DownCast (Source);
42   Handle(PFunction_Function) T = Handle(PFunction_Function)::DownCast (Target);
43   T->SetDriverGUID(S->GetDriverGUID());
44   T->SetFailure(S->GetFailure());
45 }