0024750: Replace instantiations of TCollection generic classes by NCollection templat...
[occt.git] / src / XSControl / XSControl_SelectForTransfer.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 #include <XSControl_SelectForTransfer.ixx>
15
16 XSControl_SelectForTransfer::XSControl_SelectForTransfer ()    {  }
17
18     XSControl_SelectForTransfer::XSControl_SelectForTransfer
19   (const Handle(XSControl_TransferReader)& TR)
20       {  theTR = TR;  }
21
22
23     void  XSControl_SelectForTransfer::SetReader
24   (const Handle(XSControl_TransferReader)& TR)
25       {  theTR = TR;  }
26
27     void  XSControl_SelectForTransfer::SetActor
28   (const Handle(Transfer_ActorOfTransientProcess)& act)
29       {  theAC = act;  }
30
31     Handle(Transfer_ActorOfTransientProcess)  XSControl_SelectForTransfer::Actor () const
32       {  return theAC;  }
33
34     Handle(XSControl_TransferReader)  XSControl_SelectForTransfer::Reader () const
35       {  return theTR;  }
36
37     Standard_Boolean  XSControl_SelectForTransfer::Sort
38   (const Standard_Integer /*rank*/, const Handle(Standard_Transient)& ent,
39    const Handle(Interface_InterfaceModel)& /*model*/) const
40 {
41   Handle(Transfer_ActorOfTransientProcess) act = theAC;
42   if (act.IsNull() && !theTR.IsNull()) act = theTR->Actor();
43   if (!act.IsNull()) return act->Recognize(ent);//,theTR->TransientProcess());//act->Recognize(ent);
44   return Standard_False;
45 }
46
47  
48     TCollection_AsciiString  XSControl_SelectForTransfer::ExtractLabel () const
49 {
50   if (!theTR.IsNull()) return TCollection_AsciiString
51     ("Recognized for Transfer (current actor)");
52   return TCollection_AsciiString("Recognized for Transfer");
53 }