1 // Created on: 1993-06-17
2 // Created by: Christian CAILLET
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Transfer_DispatchControl_HeaderFile
18 #define _Transfer_DispatchControl_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Interface_CopyControl.hxx>
24 #include <Standard_Boolean.hxx>
25 class Transfer_TransientProcess;
26 class Interface_InterfaceModel;
27 class Standard_Transient;
30 class Transfer_DispatchControl;
31 DEFINE_STANDARD_HANDLE(Transfer_DispatchControl, Interface_CopyControl)
33 //! This is an auxiliary class for TransferDispatch, which allows
34 //! to record simple copies, as CopyControl from Interface, but
35 //! based on a TransientProcess. Hence, it allows in addition
36 //! more actions (such as recording results of adaptations)
37 class Transfer_DispatchControl : public Interface_CopyControl
43 //! Creates the DispatchControl, ready for use
44 Standard_EXPORT Transfer_DispatchControl(const Handle(Interface_InterfaceModel)& model, const Handle(Transfer_TransientProcess)& TP);
46 //! Returns the content of the DispatchControl : it can be used
47 //! for a direct call, if the basic methods do not suffice
48 Standard_EXPORT const Handle(Transfer_TransientProcess)& TransientProcess() const;
50 //! Returns the Model from which the transfer is to be done
51 Standard_EXPORT const Handle(Interface_InterfaceModel)& StartingModel() const;
53 //! Clears the List of Copied Results
54 Standard_EXPORT void Clear() Standard_OVERRIDE;
56 //! Binds a (Transient) Result to a (Transient) Starting Entity
57 Standard_EXPORT void Bind (const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& res) Standard_OVERRIDE;
59 //! Searches for the Result bound to a Starting Entity
60 //! If Found, returns True and fills <res>
61 //! Else, returns False and nullifies <res>
62 Standard_EXPORT Standard_Boolean Search (const Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const Standard_OVERRIDE;
67 DEFINE_STANDARD_RTTIEXT(Transfer_DispatchControl,Interface_CopyControl)
77 Handle(Transfer_TransientProcess) theTP;
78 Handle(Interface_InterfaceModel) themodel;
89 #endif // _Transfer_DispatchControl_HeaderFile