0025748: Parallel version of progress indicator
[occt.git] / src / Transfer / Transfer_Actor.gxx
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 //#include <Transfer_Actor.ixx>
15
16 //  TheStart : Handle(Standard_Transient) ou (Transfer_Finder)
17
18
19
20 Transfer_Actor::Transfer_Actor ()    {  }
21
22
23     Standard_Boolean  Transfer_Actor::Recognize  (const TheStart& /*start*/)
24       {  return Standard_True;  }
25
26     Handle(Transfer_Binder) Transfer_Actor::Transferring
27   (const TheStart& /*start*/,
28    const Handle(Transfer_TransferProcess)& /*TP*/,
29    const Message_ProgressRange& /*theProgress*/)
30       {  return NullResult();  }
31
32
33     Handle(Transfer_SimpleBinderOfTransient)
34         Transfer_Actor::TransientResult
35   (const Handle(Standard_Transient)& res) const
36 {
37   Handle(Transfer_SimpleBinderOfTransient) binder;
38   if (res.IsNull()) return binder;
39   binder = new Transfer_SimpleBinderOfTransient;
40   binder->SetResult (res);
41   return binder;
42 }
43
44
45     Handle(Transfer_Binder) Transfer_Actor::NullResult () const
46 {
47   Handle(Transfer_Binder) binder;
48   return binder;
49 }
50
51
52     void Transfer_Actor::SetNext
53   (const Handle(Transfer_Actor)& next)
54 {
55   if (thenext == next) return;
56   if (thenext.IsNull())           thenext = next;
57   else if (thenext->IsLast())  {  next->SetNext(thenext);  thenext = next;  }
58   else                            thenext->SetNext(next);
59 }
60
61     Handle(Transfer_Actor) Transfer_Actor::Next () const
62       {  return thenext;  }
63
64     void Transfer_Actor::SetLast (const Standard_Boolean mode)
65       {  thelast = mode;  }
66
67
68     Standard_Boolean  Transfer_Actor::IsLast () const
69       {  return thelast;  }