b311480e |
1 | -- Created by: DAUTRY Philippe |
2 | -- Copyright (c) 1997-1999 Matra Datavision |
973c2be1 |
3 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
b311480e |
15 | |
7fd59977 |
16 | -- ------------------- |
7fd59977 |
17 | |
18 | ---Version: 0.0 |
b311480e |
19 | --Version Date Purpose |
7fd59977 |
20 | -- 0.0 Nov 4 1997 Creation |
21 | |
22 | class Transaction from DDF |
23 | inherits TShared from MMgt |
24 | |
25 | ---Purpose: This class encapsulates TDF_Transaction. |
26 | |
27 | uses |
28 | |
29 | Data from TDF, |
30 | Delta from TDF, |
31 | Transaction from TDF |
32 | |
33 | raises |
34 | |
35 | DomainError, NullObject from Standard |
36 | |
37 | is |
38 | |
39 | Create |
40 | returns Transaction from DDF; |
41 | ---Purpose: Creates an empty transaction context, unable to be |
42 | -- opened. |
43 | |
44 | Create(aDF : Data from TDF) |
45 | returns Transaction from DDF; |
46 | ---Purpose: Creates a transaction context on <aDF>, ready to |
47 | -- be opened. |
48 | |
49 | Open(me : mutable) |
50 | returns Integer from Standard; |
51 | ---Purpose: If not yet done, opens a new transaction on |
52 | -- <myDF>. Returns the index of the just opened |
53 | -- transaction. |
54 | -- |
55 | -- It raises DomainError if the transaction is |
56 | -- already open, and NullObject if there is no |
57 | -- current Data framework. |
58 | |
59 | Commit(me : mutable; |
60 | withDelta : Boolean from Standard = Standard_False) |
61 | returns Delta from TDF; |
62 | ---Purpose: Commits the transactions until AND including the |
63 | -- current opened one. |
64 | |
65 | Abort(me : mutable); |
66 | ---Purpose: Aborts the transactions until AND including the |
67 | -- current opened one. |
68 | -- |
69 | ---C++: alias ~ |
70 | |
71 | Data(me) returns Data from TDF; |
72 | ---Purpose: Returns the Data from TDF. |
73 | |
74 | Transaction(me) returns Integer from Standard; |
75 | ---Purpose: Returns the number of the transaction opened by <me>. |
76 | |
77 | IsOpen(me) |
78 | returns Boolean from Standard; |
79 | ---Purpose: Returns true if the transaction is open. |
80 | |
81 | |
82 | fields |
83 | |
84 | myTransaction : Transaction from TDF; |
85 | |
86 | end Transaction; |