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.
16 #include <STEPConstruct_Tool.ixx>
17 #include <XSControl_TransferReader.hxx>
18 #include <XSControl_TransferWriter.hxx>
20 //=======================================================================
21 //function : STEPConstruct_Tool
23 //=======================================================================
25 STEPConstruct_Tool::STEPConstruct_Tool ()
29 //=======================================================================
30 //function : STEPConstruct_Tool
32 //=======================================================================
34 STEPConstruct_Tool::STEPConstruct_Tool (const Handle(XSControl_WorkSession) &WS)
39 //=======================================================================
42 //=======================================================================
44 Standard_Boolean STEPConstruct_Tool::SetWS (const Handle(XSControl_WorkSession) &WS)
47 myTransientProcess.Nullify();
48 myFinderProcess.Nullify();
50 if ( WS.IsNull() ) return Standard_False;
52 myHGraph = myWS->HGraph();
54 // collect data on reading process
55 Handle(XSControl_TransferReader) TR = WS->TransferReader();
56 if ( ! TR.IsNull() ) myTransientProcess = TR->TransientProcess();
58 // collect data on writing process
59 Handle(XSControl_TransferWriter) TW = myWS->TransferWriter();
60 if ( ! TW.IsNull() ) myFinderProcess = TW->FinderProcess();
62 return ! myTransientProcess.IsNull() && ! myFinderProcess.IsNull();