0024157: Parallelization of assembly part of BO
[occt.git] / src / IFSelect / IFSelect_Transformer.cdl
CommitLineData
b311480e 1-- Created on: 1994-05-27
2-- Created by: Christian CAILLET
3-- Copyright (c) 1994-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23deferred class Transformer from IFSelect inherits TShared
24
25 ---Purpose : A Transformer defines the way an InterfaceModel is transformed
26 -- (without sending it to a file).
27 -- In order to work, each type of Transformer defines it method
28 -- Perform, it can be parametred as needed.
29 --
30 -- It receives a Model (the data set) as input. It then can :
31 -- - edit this Model on the spot (i.e. alter its content : by
32 -- editing entities, or adding/replacing some ...)
33 -- - produce a copied Model, which detains the needed changes
34 -- (typically on the same type, but some or all entities beeing
35 -- rebuilt or converted; or converted from a protocol to
36 -- another one)
37
38uses AsciiString from TCollection,
39 CheckIterator, Graph, Protocol from Interface, InterfaceModel
40
41is
42
43 Perform (me : mutable; G : Graph; protocol : Protocol from Interface;
44 checks : in out CheckIterator;
45 newmod : out mutable InterfaceModel) returns Boolean is deferred;
46 ---Purpose : Performs a Transformation (defined by each sub-class) :
47 -- <G> gives the input data (especially the starting model) and
48 -- can be used for queries (by Selections, etc...)
49 -- <protocol> allows to work with General Services as necessary
50 -- (it applies to input data)
51 -- If the change corresponds to a conversion to a new protocol,
52 -- see also the method ChangeProtocol
53 -- <checks> stores produced checks messages if any
54 -- <newmod> gives the result of the transformation :
55 -- - if it is Null (i.e. has not been affected), the transformation
56 -- has been made on the spot, it is assumed to cause no change
57 -- to the graph of dependances
58 -- - if it equates the starting Model, it has been transformed on
59 -- the spot (possibiliy some entities were replaced inside it)
60 -- - if it is new, it corresponds to a new data set which replaces
61 -- the starting one
62 --
63 -- <me> is mutable to allow results for ChangeProtocol to be
64 -- memorized if needed, and to store informations useful for
65 -- the method Updated
66 --
67 -- Returns True if Done, False if an Error occured : in this case,
68 -- if a new data set has been produced, the transformation
69 -- is ignored, else data may be corrupted.
70
71 ChangeProtocol (me; newproto : in out Protocol from Interface)
72 returns Boolean is virtual;
73 ---Purpose : This methods allows to declare that the Protocol applied to
74 -- the new Model has changed. It applies to the last call to
75 -- Perform.
76 --
77 -- Returns True if the Protocol has changed, False else.
78 -- The provided default keeps the starting Protocol. This method
79 -- should be redefined as required by the effect of Perform.
80
81 Updated (me; entfrom : Transient; entto : out mutable Transient)
82 returns Boolean is deferred;
83 ---Purpose : This method allows to know what happened to a starting
84 -- entity after the last Perform. If <entfrom> (from starting
85 -- model) has one and only one known item which corresponds in
86 -- the new produced model, this method must return True and
87 -- fill the argument <entto>. Else, it returns False.
88
89 Label (me) returns AsciiString from TCollection is deferred;
90 ---Purpose : Returns a text which defines the way a Transformer works
91 -- (to identify the transformation it performs)
92
93end Transformer;