0025748: Parallel version of progress indicator
[occt.git] / src / Transfer / Transfer_ActorDispatch.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 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
973c2be1 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.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14
42cf5bc1 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>
7fd59977 26
92efcf78 27IMPLEMENT_STANDARD_RTTIEXT(Transfer_ActorDispatch,Transfer_ActorOfTransientProcess)
28
b311480e 29Transfer_ActorDispatch::Transfer_ActorDispatch
7fd59977 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,
7e785937 66 const Handle(Transfer_TransientProcess)& /*TP*/,
67 const Message_ProgressRange&)
7fd59977 68{
69 thetool.TransferEntity(start);
70 return thetool.TransientProcess()->Find(start);
71}