1 // Created on: 2000-09-29
2 // Created by: Andrey BETENEV
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
17 #include <Interface_Graph.hxx>
18 #include <Interface_HGraph.hxx>
19 #include <Interface_InterfaceModel.hxx>
20 #include <STEPConstruct_Tool.hxx>
21 #include <Transfer_FinderProcess.hxx>
22 #include <Transfer_TransientProcess.hxx>
23 #include <XSControl_TransferReader.hxx>
24 #include <XSControl_TransferWriter.hxx>
25 #include <XSControl_WorkSession.hxx>
27 //=======================================================================
28 //function : STEPConstruct_Tool
30 //=======================================================================
31 STEPConstruct_Tool::STEPConstruct_Tool ()
35 //=======================================================================
36 //function : STEPConstruct_Tool
38 //=======================================================================
40 STEPConstruct_Tool::STEPConstruct_Tool (const Handle(XSControl_WorkSession) &WS)
45 //=======================================================================
48 //=======================================================================
50 Standard_Boolean STEPConstruct_Tool::SetWS (const Handle(XSControl_WorkSession) &WS)
53 myTransientProcess.Nullify();
54 myFinderProcess.Nullify();
56 if ( WS.IsNull() ) return Standard_False;
58 myHGraph = myWS->HGraph();
60 // collect data on reading process
61 const Handle(XSControl_TransferReader) &TR = WS->TransferReader();
62 if ( ! TR.IsNull() ) myTransientProcess = TR->TransientProcess();
64 // collect data on writing process
65 const Handle(XSControl_TransferWriter) &TW = myWS->TransferWriter();
66 if ( ! TW.IsNull() ) myFinderProcess = TW->FinderProcess();
68 return ! myTransientProcess.IsNull() && ! myFinderProcess.IsNull();