0025748: Parallel version of progress indicator
[occt.git] / src / Transfer / Transfer_ActorDispatch.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Interface_GeneralLib.hxx>
16 #include <Interface_InterfaceError.hxx>
17 #include <Interface_InterfaceModel.hxx>
18 #include <Interface_Protocol.hxx>
19 #include <Standard_Transient.hxx>
20 #include <Standard_Type.hxx>
21 #include <Transfer_ActorDispatch.hxx>
22 #include <Transfer_ActorOfTransientProcess.hxx>
23 #include <Transfer_Binder.hxx>
24 #include <Transfer_TransferDispatch.hxx>
25 #include <Transfer_TransientProcess.hxx>
26
27 IMPLEMENT_STANDARD_RTTIEXT(Transfer_ActorDispatch,Transfer_ActorOfTransientProcess)
28
29 Transfer_ActorDispatch::Transfer_ActorDispatch
30   (const Handle(Interface_InterfaceModel)& amodel,
31    const Interface_GeneralLib& lib)
32     :  thetool (amodel,lib)
33 {
34   SetLast(Standard_True);  // actor par defaut
35   thetool.TransientProcess()->SetActor(this);
36 }
37
38     Transfer_ActorDispatch::Transfer_ActorDispatch
39   (const Handle(Interface_InterfaceModel)& amodel,
40    const Handle(Interface_Protocol)& protocol)
41     :  thetool (amodel,protocol)
42 {
43   SetLast(Standard_True);  // actor par defaut
44   thetool.TransientProcess()->SetActor(this);
45 }
46
47     Transfer_ActorDispatch::Transfer_ActorDispatch
48   (const Handle(Interface_InterfaceModel)& amodel)
49     :  thetool (amodel)
50 {
51   SetLast(Standard_True);  // actor par defaut
52   thetool.TransientProcess()->SetActor(this);
53 }
54
55
56     void  Transfer_ActorDispatch::AddActor
57   (const Handle(Transfer_ActorOfTransientProcess)& actor)
58       {  thetool.TransientProcess()->SetActor(actor);  }
59
60     Transfer_TransferDispatch&  Transfer_ActorDispatch::TransferDispatch ()
61       {  return thetool;  }
62
63
64     Handle(Transfer_Binder)  Transfer_ActorDispatch::Transfer
65   (const Handle(Standard_Transient)& start,
66    const Handle(Transfer_TransientProcess)& /*TP*/,
67    const Message_ProgressRange&)
68 {
69   thetool.TransferEntity(start);
70   return thetool.TransientProcess()->Find(start);
71 }