0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[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       {  return NullResult();  }
30
31
32     Handle(Transfer_SimpleBinderOfTransient)
33         Transfer_Actor::TransientResult
34   (const Handle(Standard_Transient)& res) const
35 {
36   Handle(Transfer_SimpleBinderOfTransient) binder;
37   if (res.IsNull()) return binder;
38   binder = new Transfer_SimpleBinderOfTransient;
39   binder->SetResult (res);
40   return binder;
41 }
42
43
44     Handle(Transfer_Binder) Transfer_Actor::NullResult () const
45 {
46   Handle(Transfer_Binder) binder;
47   return binder;
48 }
49
50
51     void Transfer_Actor::SetNext
52   (const Handle(Transfer_Actor)& next)
53 {
54   if (thenext == next) return;
55   if (thenext.IsNull())           thenext = next;
56   else if (thenext->IsLast())  {  next->SetNext(thenext);  thenext = next;  }
57   else                            thenext->SetNext(next);
58 }
59
60     Handle(Transfer_Actor) Transfer_Actor::Next () const
61       {  return thenext;  }
62
63     void Transfer_Actor::SetLast (const Standard_Boolean mode)
64       {  thelast = mode;  }
65
66
67     Standard_Boolean  Transfer_Actor::IsLast () const
68       {  return thelast;  }