1 -- Created on: 1993-03-16
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class CopyMap from Interface inherits CopyControl
19 ---Purpose : Manages a Map for the need of single Transfers, such as Copies
20 -- In such transfer, Starting Entities are read from a unique
21 -- Starting Model, and each transferred Entity is bound to one
22 -- and only one Result, which cannot be changed later.
24 uses Transient, Array1OfTransient from TColStd, InterfaceModel
30 Create (amodel : InterfaceModel) returns CopyMap;
31 ---Purpose : Creates a CopyMap adapted to work from a Model
34 ---Purpose : Clears Transfer List. Gets Ready to begin another Transfer
36 Model (me) returns InterfaceModel is static;
37 ---Purpose : Returns the InterfaceModel used at Creation time
39 Bind (me : mutable; ent : Transient; res : Transient)
40 ---Purpose : Binds a Starting Entity identified by its Number <num> in the
41 -- Starting Model, to a Result of Transfer <res>
42 raises InterfaceError;
43 -- Error if <num> is already bound to a result, or is out of range
45 Search (me; ent : Transient; res : out Transient)
47 ---Purpose : Search for the result of a Starting Object (i.e. an Entity,
48 -- identified by its Number <num> in the Starting Model)
49 -- Returns True if a Result is Bound (and fills <res>)
50 -- Returns False if no result is Bound (and nullifies <res>)
54 themod : InterfaceModel; -- Starting Model
55 theres : Array1OfTransient; -- list of bound Results