0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- prepar...
[occt.git] / src / XSControl / XSControl_SelectForTransfer.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
42cf5bc1 14
15#include <Interface_InterfaceModel.hxx>
16#include <Standard_Transient.hxx>
17#include <Standard_Type.hxx>
18#include <TCollection_AsciiString.hxx>
19#include <Transfer_ActorOfTransientProcess.hxx>
20#include <XSControl_SelectForTransfer.hxx>
21#include <XSControl_TransferReader.hxx>
7fd59977 22
92efcf78 23IMPLEMENT_STANDARD_RTTIEXT(XSControl_SelectForTransfer,IFSelect_SelectExtract)
24
b311480e 25XSControl_SelectForTransfer::XSControl_SelectForTransfer () { }
7fd59977 26
27 XSControl_SelectForTransfer::XSControl_SelectForTransfer
28 (const Handle(XSControl_TransferReader)& TR)
29 { theTR = TR; }
30
31
32 void XSControl_SelectForTransfer::SetReader
33 (const Handle(XSControl_TransferReader)& TR)
34 { theTR = TR; }
35
36 void XSControl_SelectForTransfer::SetActor
37 (const Handle(Transfer_ActorOfTransientProcess)& act)
38 { theAC = act; }
39
40 Handle(Transfer_ActorOfTransientProcess) XSControl_SelectForTransfer::Actor () const
41 { return theAC; }
42
43 Handle(XSControl_TransferReader) XSControl_SelectForTransfer::Reader () const
44 { return theTR; }
45
46 Standard_Boolean XSControl_SelectForTransfer::Sort
47 (const Standard_Integer /*rank*/, const Handle(Standard_Transient)& ent,
48 const Handle(Interface_InterfaceModel)& /*model*/) const
49{
50 Handle(Transfer_ActorOfTransientProcess) act = theAC;
51 if (act.IsNull() && !theTR.IsNull()) act = theTR->Actor();
52 if (!act.IsNull()) return act->Recognize(ent);//,theTR->TransientProcess());//act->Recognize(ent);
53 return Standard_False;
54}
55
56
57 TCollection_AsciiString XSControl_SelectForTransfer::ExtractLabel () const
58{
59 if (!theTR.IsNull()) return TCollection_AsciiString
60 ("Recognized for Transfer (current actor)");
61 return TCollection_AsciiString("Recognized for Transfer");
62}