0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / TDF / TDF_Transaction.cdl
1 -- Created by: DAUTRY Philippe
2 -- Copyright (c) 1997-1999 Matra Datavision
3 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 --              -------------------
17
18 ---Version:     0.0
19 --Version       Date            Purpose
20 --              0.0     Oct  1 1997     Creation
21
22
23 class Transaction from TDF
24
25         ---Purpose: This class offers services to open, commit or
26         --          abort a transaction in a more secure way than
27         --          using Data from TDF. If you forget to close a
28         --          transaction, it will be automaticaly aborted at
29         --          the destruction of this object, at the closure of
30         --          its scope.
31         --          
32         --          In case of catching errors, the effect will be the
33         --          same: aborting transactions until the good current
34         --          one.
35
36 uses
37
38     Data  from TDF,
39     Delta from TDF,
40     AsciiString from TCollection
41
42 raises
43
44     DomainError, NullObject from Standard
45
46 is
47
48     Create(aName : AsciiString from TCollection = "")
49         returns Transaction from TDF;
50         ---Purpose: Creates an empty transaction context, unable to be
51         --          opened.
52
53     Create(aTrans : Transaction from TDF)
54         returns Transaction from TDF
55         is private;
56         ---Purpose: Private to avoid copy.
57
58     Create(aDF : Data from TDF;
59            aName : AsciiString from TCollection = "")
60         returns Transaction from TDF;
61         ---Purpose: Creates a transaction context on <aDF>, ready to
62         --          be opened.
63
64     Initialize(me : in out; aDF : Data from TDF);
65         ---Purpose: Aborts all the transactions on <myDF> and sets
66         --          <aDF> to build a transaction context on <aDF>,
67         --          ready to be opened.
68
69     Open(me : in out)
70         returns Integer from Standard
71         raises DomainError, NullObject from Standard;
72         ---Purpose: If not yet done, opens a new transaction on
73         --          <myDF>. Returns the index of the just opened
74         --          transaction.
75         --          
76         --          It raises DomainError if the transaction is
77         --          already open, and NullObject if there is no
78         --          current Data framework.
79
80     Commit(me : in out;
81            withDelta : Boolean from Standard = Standard_False)
82         returns Delta from TDF;
83         ---Purpose: Commits the transactions until AND including the
84         --          current opened one.
85
86     Abort(me : in out);
87         ---Purpose: Aborts the transactions until AND including the
88         --          current opened one.
89         --          
90         ---C++: alias ~
91
92     Data(me) returns Data from TDF;
93         ---Purpose: Returns the Data from TDF.
94         --          
95         ---C++: inline
96
97     Transaction(me) returns Integer from Standard;
98         ---Purpose: Returns the number of the transaction opened by <me>.
99         --          
100         ---C++: inline
101
102     Name(me) returns AsciiString from TCollection;
103         ---Purpose: Returns the transaction name.
104         --          
105         ---C++: return const &
106
107     IsOpen(me)
108         returns Boolean from Standard;
109         ---Purpose: Returns true if the transaction is open.
110         --          
111         ---C++: inline
112
113
114 fields
115
116     myDF               : Data from TDF;
117     myUntilTransaction : Integer from Standard;
118     myName             : AsciiString from TCollection;
119
120 end Transaction;