Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:18:35

0001 // Created on: 1993-06-17
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1993-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 _Transfer_DispatchControl_HeaderFile
0018 #define _Transfer_DispatchControl_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Interface_CopyControl.hxx>
0024 class Transfer_TransientProcess;
0025 class Interface_InterfaceModel;
0026 class Standard_Transient;
0027 
0028 class Transfer_DispatchControl;
0029 DEFINE_STANDARD_HANDLE(Transfer_DispatchControl, Interface_CopyControl)
0030 
0031 //! This is an auxiliary class for TransferDispatch, which allows
0032 //! to record simple copies, as CopyControl from Interface, but
0033 //! based on a TransientProcess. Hence, it allows in addition
0034 //! more actions (such as recording results of adaptations)
0035 class Transfer_DispatchControl : public Interface_CopyControl
0036 {
0037 
0038 public:
0039   //! Creates the DispatchControl, ready for use
0040   Standard_EXPORT Transfer_DispatchControl(const Handle(Interface_InterfaceModel)&  model,
0041                                            const Handle(Transfer_TransientProcess)& TP);
0042 
0043   //! Returns the content of the DispatchControl : it can be used
0044   //! for a direct call, if the basic methods do not suffice
0045   Standard_EXPORT const Handle(Transfer_TransientProcess)& TransientProcess() const;
0046 
0047   //! Returns the Model from which the transfer is to be done
0048   Standard_EXPORT const Handle(Interface_InterfaceModel)& StartingModel() const;
0049 
0050   //! Clears the List of Copied Results
0051   Standard_EXPORT void Clear() Standard_OVERRIDE;
0052 
0053   //! Binds a (Transient) Result to a (Transient) Starting Entity
0054   Standard_EXPORT void Bind(const Handle(Standard_Transient)& ent,
0055                             const Handle(Standard_Transient)& res) Standard_OVERRIDE;
0056 
0057   //! Searches for the Result bound to a Starting Entity
0058   //! If Found, returns True and fills <res>
0059   //! Else, returns False and nullifies <res>
0060   Standard_EXPORT Standard_Boolean Search(const Handle(Standard_Transient)& ent,
0061                                           Handle(Standard_Transient)& res) const Standard_OVERRIDE;
0062 
0063   DEFINE_STANDARD_RTTIEXT(Transfer_DispatchControl, Interface_CopyControl)
0064 
0065 protected:
0066 private:
0067   Handle(Transfer_TransientProcess) theTP;
0068   Handle(Interface_InterfaceModel)  themodel;
0069 };
0070 
0071 #endif // _Transfer_DispatchControl_HeaderFile