0032696: Coding - get rid of unused forward declarations [StepSelect to Xw]
[occt.git] / src / Transfer / Transfer_TransferDispatch.hxx
1 // Created on: 1992-02-07
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _Transfer_TransferDispatch_HeaderFile
18 #define _Transfer_TransferDispatch_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Interface_CopyTool.hxx>
25 #include <Standard_Boolean.hxx>
26 class Interface_InterfaceModel;
27 class Interface_GeneralLib;
28 class Interface_Protocol;
29 class Transfer_TransientProcess;
30 class Standard_Transient;
31
32
33 //! A TransferDispatch is aimed to dispatch Entities between two
34 //! Interface Models, by default by copying them, as CopyTool, but
35 //! with more capabilities of adapting : Copy is redefined to
36 //! firstly pass the hand to a TransferProcess. If this gives no
37 //! result, standard Copy is called.
38 //!
39 //! This allow, for instance, to modify the copied Entity (such as
40 //! changing a Name for a VDA Entity), or to do a deeper work
41 //! (such as Substituting a kind of Entity to another one).
42 //!
43 //! For these reasons, TransferDispatch is basically a CopyTool,
44 //! but uses a more sophiscated control, which is TransferProcess,
45 //! and its method Copy is redefined
46 class Transfer_TransferDispatch  : public Interface_CopyTool
47 {
48 public:
49
50   DEFINE_STANDARD_ALLOC
51
52   
53   //! Creates a TransferDispatch from a Model. Works with a General
54   //! Service Library, given as an Argument
55   //! A TransferDispatch is created as a CopyTool in which the
56   //! Control is set to TransientProcess
57   Standard_EXPORT Transfer_TransferDispatch(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib);
58   
59   //! Same as above, but Library is defined through a Protocol
60   Standard_EXPORT Transfer_TransferDispatch(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol);
61   
62   //! Same as above, but works with the Active Protocol
63   Standard_EXPORT Transfer_TransferDispatch(const Handle(Interface_InterfaceModel)& amodel);
64   
65   //! Returns the content of Control Object, as a TransientProcess
66   Standard_EXPORT Handle(Transfer_TransientProcess) TransientProcess() const;
67   
68   //! Copies an Entity by calling the method Transferring from the
69   //! TransferProcess. If this called produces a Null Binder, then
70   //! the standard, inherited Copy is called
71   Standard_EXPORT virtual Standard_Boolean Copy (const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto, const Standard_Boolean mapped, const Standard_Boolean errstat) Standard_OVERRIDE;
72
73
74
75
76 protected:
77
78
79
80
81
82 private:
83
84
85
86
87
88 };
89
90
91
92
93
94
95
96 #endif // _Transfer_TransferDispatch_HeaderFile