0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / DDF / DDF_Transaction.cxx
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 // Version:     0.0
18 //Version       Date            Purpose
19 //              0.0     Nov  4 1997     Creation
20
21 #include <DDF_Transaction.hxx>
22 #include <Standard_DomainError.hxx>
23 #include <Standard_NullObject.hxx>
24 #include <Standard_Type.hxx>
25 #include <TDF_Data.hxx>
26 #include <TDF_Delta.hxx>
27
28 IMPLEMENT_STANDARD_RTTIEXT(DDF_Transaction,Standard_Transient)
29
30 //=======================================================================
31 //function : DDF_Transaction
32 //purpose  : 
33 //=======================================================================
34 DDF_Transaction::DDF_Transaction()
35 : myTransaction( TCollection_AsciiString() )
36 {}
37
38
39 //=======================================================================
40 //function : DDF_Transaction
41 //purpose  : 
42 //=======================================================================
43
44 DDF_Transaction::DDF_Transaction(const Handle(TDF_Data)& aDF)
45 : myTransaction( TCollection_AsciiString() )
46 { myTransaction.Initialize(aDF); }
47
48
49 //=======================================================================
50 //function : Open
51 //purpose  : 
52 //=======================================================================
53
54 Standard_Integer DDF_Transaction::Open()
55 { return myTransaction.Open(); }
56
57
58 //=======================================================================
59 //function : Commit
60 //purpose  : 
61 //=======================================================================
62
63 Handle(TDF_Delta) DDF_Transaction::Commit(const Standard_Boolean withDelta)
64 { return myTransaction.Commit(withDelta); }
65
66
67 //=======================================================================
68 //function : Abort
69 //purpose  : alias ~
70 //=======================================================================
71
72 void DDF_Transaction::Abort()
73 { myTransaction.Abort(); }
74
75
76 //=======================================================================
77 //function : Data
78 //purpose  : 
79 //=======================================================================
80
81 Handle(TDF_Data) DDF_Transaction::Data() const
82 { return myTransaction.Data(); }
83
84
85 //=======================================================================
86 //function : Transaction
87 //purpose  : 
88 //=======================================================================
89
90 Standard_Integer DDF_Transaction::Transaction() const
91 { return myTransaction.Transaction(); }
92
93
94 //=======================================================================
95 //function : IsOpen
96 //purpose  : 
97 //=======================================================================
98
99 Standard_Boolean DDF_Transaction::IsOpen() const
100 { return myTransaction.IsOpen(); }
101