| 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 | class SelectForTransfer from XSControl inherits SelectExtract from IFSelect |
| 18 | |
| 19 | ---Purpose : This selection selects the entities which are recognised for |
| 20 | -- transfer by an Actor for Read : current one or another one. |
| 21 | -- |
| 22 | -- An Actor is an operator which runs transfers from interface |
| 23 | -- entities to objects for Imagine. It has a method to recognize |
| 24 | -- the entities it can process (by default, it recognises all, |
| 25 | -- this method can be redefined). |
| 26 | -- |
| 27 | -- A TransferReader brings an Actor, according to the currently |
| 28 | -- selected norm and transfer conditions. |
| 29 | -- |
| 30 | -- This selection considers, either the current Actor (brought by |
| 31 | -- the TransferReader, updated as required), or a precise one. |
| 32 | |
| 33 | uses AsciiString from TCollection, InterfaceModel, |
| 34 | ActorOfTransientProcess, TransferReader |
| 35 | |
| 36 | is |
| 37 | |
| 38 | Create returns SelectForTransfer; |
| 39 | ---Purpose : Creates a SelectForTransfer, non initialised |
| 40 | -- it sorts nothing, unless an Actor has been defined |
| 41 | |
| 42 | Create (TR : TransferReader) returns SelectForTransfer; |
| 43 | ---Purpose : Creates a SelectForTransfer, which will work with the |
| 44 | -- currently defined Actor brought by the TransferReader |
| 45 | |
| 46 | SetReader (me : mutable; TR : TransferReader); |
| 47 | ---Purpose : Sets a TransferReader to sort entities : it brings the Actor, |
| 48 | -- which may change, while the TransferReader does not |
| 49 | |
| 50 | SetActor (me : mutable; act : ActorOfTransientProcess); |
| 51 | ---Purpose : Sets a precise actor to sort entities |
| 52 | -- This definition oversedes the creation with a TransferReader |
| 53 | |
| 54 | Actor (me) returns ActorOfTransientProcess; |
| 55 | ---Purpose : Returns the Actor used as precised one. |
| 56 | -- Returns a Null Handle for a creation from a TransferReader |
| 57 | -- without any further setting |
| 58 | |
| 59 | Reader (me) returns TransferReader; |
| 60 | ---Purpose : Returns the Reader (if created with a Reader) |
| 61 | -- Returns a Null Handle if not created with a Reader |
| 62 | |
| 63 | |
| 64 | Sort (me; rank : Integer; ent : Transient; model : InterfaceModel) |
| 65 | returns Boolean; |
| 66 | ---Purpose : Returns True for an Entity which is recognized by the Actor, |
| 67 | -- either the precised one, or the one defined by TransferReader |
| 68 | |
| 69 | --Sort (me; ent : in out Transient) returns Boolean; |
| 70 | |
| 71 | ExtractLabel (me) returns AsciiString from TCollection; |
| 72 | ---Purpose : Returns a text defining the criterium : "Recognized for Transfer [(current actor)]" |
| 73 | |
| 74 | fields |
| 75 | |
| 76 | theTR : TransferReader; |
| 77 | theAC : ActorOfTransientProcess; |
| 78 | |
| 79 | end SelectForTransfer; |