Warnings on vc14 were eliminated
[occt.git] / src / XSControl / XSControl_SelectForTransfer.hxx
CommitLineData
42cf5bc1 1// Created on: 1996-03-26
2// Created by: Christian CAILLET
3// Copyright (c) 1996-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _XSControl_SelectForTransfer_HeaderFile
18#define _XSControl_SelectForTransfer_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <IFSelect_SelectExtract.hxx>
24#include <Standard_Boolean.hxx>
25#include <Standard_Integer.hxx>
26class XSControl_TransferReader;
27class Transfer_ActorOfTransientProcess;
28class Standard_Transient;
29class Interface_InterfaceModel;
30class TCollection_AsciiString;
31
32
33class XSControl_SelectForTransfer;
34DEFINE_STANDARD_HANDLE(XSControl_SelectForTransfer, IFSelect_SelectExtract)
35
36//! This selection selects the entities which are recognised for
37//! transfer by an Actor for Read : current one or another one.
38//!
39//! An Actor is an operator which runs transfers from interface
40//! entities to objects for Imagine. It has a method to recognize
41//! the entities it can process (by default, it recognises all,
42//! this method can be redefined).
43//!
44//! A TransferReader brings an Actor, according to the currently
45//! selected norm and transfer conditions.
46//!
47//! This selection considers, either the current Actor (brought by
48//! the TransferReader, updated as required), or a precise one.
49class XSControl_SelectForTransfer : public IFSelect_SelectExtract
50{
51
52public:
53
54
55 //! Creates a SelectForTransfer, non initialised
56 //! it sorts nothing, unless an Actor has been defined
57 Standard_EXPORT XSControl_SelectForTransfer();
58
59 //! Creates a SelectForTransfer, which will work with the
60 //! currently defined Actor brought by the TransferReader
61 Standard_EXPORT XSControl_SelectForTransfer(const Handle(XSControl_TransferReader)& TR);
62
63 //! Sets a TransferReader to sort entities : it brings the Actor,
64 //! which may change, while the TransferReader does not
65 Standard_EXPORT void SetReader (const Handle(XSControl_TransferReader)& TR);
66
67 //! Sets a precise actor to sort entities
68 //! This definition oversedes the creation with a TransferReader
69 Standard_EXPORT void SetActor (const Handle(Transfer_ActorOfTransientProcess)& act);
70
71 //! Returns the Actor used as precised one.
72 //! Returns a Null Handle for a creation from a TransferReader
73 //! without any further setting
74 Standard_EXPORT Handle(Transfer_ActorOfTransientProcess) Actor() const;
75
76 //! Returns the Reader (if created with a Reader)
77 //! Returns a Null Handle if not created with a Reader
78 Standard_EXPORT Handle(XSControl_TransferReader) Reader() const;
79
80 //! Returns True for an Entity which is recognized by the Actor,
81 //! either the precised one, or the one defined by TransferReader
79104795 82 Standard_EXPORT Standard_Boolean Sort (const Standard_Integer rank, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
42cf5bc1 83
84 //! Returns a text defining the criterium : "Recognized for Transfer [(current actor)]"
79104795 85 Standard_EXPORT TCollection_AsciiString ExtractLabel() const Standard_OVERRIDE;
42cf5bc1 86
87
88
89
92efcf78 90 DEFINE_STANDARD_RTTIEXT(XSControl_SelectForTransfer,IFSelect_SelectExtract)
42cf5bc1 91
92protected:
93
94
95
96
97private:
98
99
100 Handle(XSControl_TransferReader) theTR;
101 Handle(Transfer_ActorOfTransientProcess) theAC;
102
103
104};
105
106
107
108
109
110
111
112#endif // _XSControl_SelectForTransfer_HeaderFile