1 // Created by: DAUTRY Philippe
2 // Copyright (c) 1997-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // -------------------
18 //Version Date Purpose
19 // 0.0 Nov 4 1997 Creation
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>
28 IMPLEMENT_STANDARD_RTTIEXT(DDF_Transaction,MMgt_TShared)
30 //=======================================================================
31 //function : DDF_Transaction
33 //=======================================================================
34 DDF_Transaction::DDF_Transaction()
35 : myTransaction( TCollection_AsciiString() )
39 //=======================================================================
40 //function : DDF_Transaction
42 //=======================================================================
44 DDF_Transaction::DDF_Transaction(const Handle(TDF_Data)& aDF)
45 : myTransaction( TCollection_AsciiString() )
46 { myTransaction.Initialize(aDF); }
49 //=======================================================================
52 //=======================================================================
54 Standard_Integer DDF_Transaction::Open()
55 { return myTransaction.Open(); }
58 //=======================================================================
61 //=======================================================================
63 Handle(TDF_Delta) DDF_Transaction::Commit(const Standard_Boolean withDelta)
64 { return myTransaction.Commit(withDelta); }
67 //=======================================================================
70 //=======================================================================
72 void DDF_Transaction::Abort()
73 { myTransaction.Abort(); }
76 //=======================================================================
79 //=======================================================================
81 Handle(TDF_Data) DDF_Transaction::Data() const
82 { return myTransaction.Data(); }
85 //=======================================================================
86 //function : Transaction
88 //=======================================================================
90 Standard_Integer DDF_Transaction::Transaction() const
91 { return myTransaction.Transaction(); }
94 //=======================================================================
97 //=======================================================================
99 Standard_Boolean DDF_Transaction::IsOpen() const
100 { return myTransaction.IsOpen(); }