0025923: Remove small wires on face read from STEP
[occt.git] / src / MDataStd / MDataStd_AsciiStringRetrievalDriver.cxx
1 // Created on: 2007-08-23
2 // Created by: Sergey ZARITCHNY
3 // Copyright (c) 2007-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <MDataStd_AsciiStringRetrievalDriver.ixx>
17 #include <PDataStd_AsciiString.hxx>
18 #include <TDataStd_AsciiString.hxx>
19 #include <TCollection_AsciiString.hxx>
20 #include <PCollection_HAsciiString.hxx>
21 #include <CDM_MessageDriver.hxx>
22
23 //=======================================================================
24 //function : MDataStd_AsciiStringRetrievalDriver
25 //purpose  : Constructor
26 //=======================================================================
27 MDataStd_AsciiStringRetrievalDriver::MDataStd_AsciiStringRetrievalDriver
28   (const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
29 {
30 }
31 //=======================================================================
32 //function : VersionNumber
33 //purpose  : 
34 //=======================================================================
35 Standard_Integer MDataStd_AsciiStringRetrievalDriver::VersionNumber() const
36 { return 0; }
37
38 //=======================================================================
39 //function : SourceType
40 //purpose  : 
41 //=======================================================================
42 Handle(Standard_Type) MDataStd_AsciiStringRetrievalDriver::SourceType() const
43 { return STANDARD_TYPE(PDataStd_AsciiString); }
44
45 //=======================================================================
46 //function : NewEmpty
47 //purpose  : 
48 //=======================================================================
49 Handle(TDF_Attribute) MDataStd_AsciiStringRetrievalDriver::NewEmpty() const
50 { return new TDataStd_AsciiString (); }
51
52 //=======================================================================
53 //function : Paste
54 //purpose  : 
55 //=======================================================================
56 void MDataStd_AsciiStringRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
57 const Handle(TDF_Attribute)& Target,const Handle(MDF_RRelocationTable)& ) const
58 {
59   Handle(PDataStd_AsciiString) S = Handle(PDataStd_AsciiString)::DownCast (Source);
60   Handle(TDataStd_AsciiString) T = Handle(TDataStd_AsciiString)::DownCast (Target);
61   if(!S.IsNull() && !T.IsNull()) {
62     if(!S->Get().IsNull()) {
63       TCollection_AsciiString aString((S->Get())->Convert ());
64       T->Set (aString);
65     }
66   }
67 }
68