|
||||
File indexing completed on 2025-01-18 10:05:05
0001 // Created on: 2000-09-29 0002 // Created by: Andrey BETENEV 0003 // Copyright (c) 2000-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _STEPConstruct_Tool_HeaderFile 0017 #define _STEPConstruct_Tool_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <Standard_Boolean.hxx> 0024 class XSControl_WorkSession; 0025 class Transfer_FinderProcess; 0026 class Transfer_TransientProcess; 0027 class Interface_HGraph; 0028 class Interface_InterfaceModel; 0029 class Interface_Graph; 0030 0031 0032 //! Provides basic functionalities for tools which are intended 0033 //! for encoding/decoding specific STEP constructs 0034 //! 0035 //! It is initialized by WorkSession and allows easy access to 0036 //! its fields and internal data such as Model, TP and FP 0037 //! 0038 //! NOTE: Call to method Graph() with True (or for a first time, 0039 //! if you have updated the model since last computation of model) 0040 //! can take a time, so it is recommended to avoid creation of 0041 //! this (and derived) tool multiple times 0042 class STEPConstruct_Tool 0043 { 0044 public: 0045 0046 DEFINE_STANDARD_ALLOC 0047 0048 0049 //! Creates an empty tool 0050 Standard_EXPORT STEPConstruct_Tool(); 0051 0052 //! Creates a tool and loads it with worksession 0053 Standard_EXPORT STEPConstruct_Tool(const Handle(XSControl_WorkSession)& WS); 0054 0055 //! Returns currently loaded WorkSession 0056 const Handle(XSControl_WorkSession)& WS() const; 0057 0058 //! Returns current model (Null if not loaded) 0059 Handle(Interface_InterfaceModel) Model() const; 0060 0061 //! Returns current graph (recomputing if necessary) 0062 const Interface_Graph& Graph (const Standard_Boolean recompute = Standard_False) const; 0063 0064 //! Returns TransientProcess (reading; Null if not loaded) 0065 const Handle(Transfer_TransientProcess)& TransientProcess() const; 0066 0067 //! Returns FinderProcess (writing; Null if not loaded) 0068 const Handle(Transfer_FinderProcess)& FinderProcess() const; 0069 0070 0071 0072 0073 protected: 0074 0075 0076 //! Load worksession; returns True if succeeded 0077 //! Returns False if either FinderProcess of TransientProcess 0078 //! cannot be obtained or are Null 0079 Standard_EXPORT Standard_Boolean SetWS (const Handle(XSControl_WorkSession)& WS); 0080 0081 0082 0083 0084 private: 0085 0086 0087 0088 Handle(XSControl_WorkSession) myWS; 0089 Handle(Transfer_FinderProcess) myFinderProcess; 0090 Handle(Transfer_TransientProcess) myTransientProcess; 0091 Handle(Interface_HGraph) myHGraph; 0092 0093 0094 }; 0095 0096 0097 #include <STEPConstruct_Tool.lxx> 0098 0099 0100 0101 0102 0103 #endif // _STEPConstruct_Tool_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |