Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:17:54

0001 // Created on: 1995-02-20
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _STEPControl_Controller_HeaderFile
0018 #define _STEPControl_Controller_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <XSControl_Controller.hxx>
0024 #include <IFSelect_ReturnStatus.hxx>
0025 #include <Standard_Integer.hxx>
0026 class Interface_InterfaceModel;
0027 class XSControl_WorkSession;
0028 class TopoDS_Shape;
0029 class Transfer_FinderProcess;
0030 
0031 //! defines basic controller for STEP processor
0032 class STEPControl_Controller : public XSControl_Controller
0033 {
0034 
0035 public:
0036   //! Initializes the use of STEP Norm (the first time) and
0037   //! returns a Controller
0038   Standard_EXPORT STEPControl_Controller();
0039 
0040   //! Creates a new empty Model ready to receive data of the Norm.
0041   //! It is taken from STEP Template Model
0042   Standard_EXPORT occ::handle<Interface_InterfaceModel> NewModel() const override;
0043 
0044   //! Returns the Actor for Read attached to the pair (norm,appli)
0045   Standard_EXPORT occ::handle<Transfer_ActorOfTransientProcess> ActorRead(
0046     const occ::handle<Interface_InterfaceModel>& theModel) const override;
0047 
0048   Standard_EXPORT void Customise(occ::handle<XSControl_WorkSession>& WS) override;
0049 
0050   //! Takes one Shape and transfers it to the InterfaceModel
0051   //! (already created by NewModel for instance)
0052   //! <modeshape> is to be interpreted by each kind of XstepAdaptor
0053   //! Returns a status : 0 OK  1 No result  2 Fail  -1 bad modeshape
0054   //! -2 bad model (requires a StepModel)
0055   //! modeshape : 1 Facetted BRep, 2 Shell, 3 Manifold Solid
0056   Standard_EXPORT IFSelect_ReturnStatus TransferWriteShape(
0057     const TopoDS_Shape&                          shape,
0058     const occ::handle<Transfer_FinderProcess>&   FP,
0059     const occ::handle<Interface_InterfaceModel>& model,
0060     const int                                    modetrans = 0,
0061     const Message_ProgressRange& theProgress = Message_ProgressRange()) const override;
0062 
0063   //! Standard Initialisation. It creates a Controller for STEP
0064   //! and records it to various names, available to select it later
0065   //! Returns True when done, False if could not be done
0066   Standard_EXPORT static bool Init();
0067 
0068   DEFINE_STANDARD_RTTIEXT(STEPControl_Controller, XSControl_Controller)
0069 };
0070 
0071 #endif // _STEPControl_Controller_HeaderFile