Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions
TDF_Transaction Class Reference

This class offers services to open, commit or
abort a transaction in a more secure way than
using Data from TDF. If you forget to close a
transaction, it will be automaticaly aborted at
the destruction of this object, at the closure of
its scope.

In case of catching errors, the effect will be the
same: aborting transactions until the good current
one.
More...

#include <TDF_Transaction.hxx>

Public Member Functions

 TDF_Transaction (const TCollection_AsciiString &aName="")
 Creates an empty transaction context, unable to be
opened.
More...
 
 TDF_Transaction (const Handle< TDF_Data > &aDF, const TCollection_AsciiString &aName="")
 Creates a transaction context on <aDF>, ready to
be opened.
More...
 
void Initialize (const Handle< TDF_Data > &aDF)
 Aborts all the transactions on <myDF> and sets
<aDF> to build a transaction context on <aDF>,
ready to be opened.
More...
 
Standard_Integer Open ()
 
 If not yet done, opens a new transaction on <br>
     <myDF>. Returns the index of the just opened <br>
     transaction. <br>


It raises DomainError if the transaction is
already open, and NullObject if there is no
current Data framework.
More...

 
Handle_TDF_Delta Commit (const Standard_Boolean withDelta=Standard_False)
 Commits the transactions until AND including the
current opened one.
More...
 
void Abort ()
 
 Aborts the transactions until AND including the <br>
     current opened one. <br>


More...

 
 ~TDF_Transaction ()
 
Handle_TDF_Data Data () const
 
 Returns the Data from TDF. <br>


More...

 
Standard_Integer Transaction () const
 
 Returns the number of the transaction opened by <me>. <br>


More...

 
const TCollection_AsciiStringName () const
 
 Returns the transaction name. <br>


More...

 
Standard_Boolean IsOpen () const
 
 Returns true if the transaction is open. <br>


More...

 

Detailed Description

This class offers services to open, commit or
abort a transaction in a more secure way than
using Data from TDF. If you forget to close a
transaction, it will be automaticaly aborted at
the destruction of this object, at the closure of
its scope.

In case of catching errors, the effect will be the
same: aborting transactions until the good current
one.

Constructor & Destructor Documentation

TDF_Transaction::TDF_Transaction ( const TCollection_AsciiString aName = "")

Creates an empty transaction context, unable to be
opened.

TDF_Transaction::TDF_Transaction ( const Handle< TDF_Data > &  aDF,
const TCollection_AsciiString aName = "" 
)

Creates a transaction context on <aDF>, ready to
be opened.

TDF_Transaction::~TDF_Transaction ( )
inline

Member Function Documentation

void TDF_Transaction::Abort ( )

 Aborts the transactions until AND including the <br>
     current opened one. <br>


Handle_TDF_Delta TDF_Transaction::Commit ( const Standard_Boolean  withDelta = Standard_False)

Commits the transactions until AND including the
current opened one.

Handle_TDF_Data TDF_Transaction::Data ( ) const

 Returns the Data from TDF. <br>


void TDF_Transaction::Initialize ( const Handle< TDF_Data > &  aDF)

Aborts all the transactions on <myDF> and sets
<aDF> to build a transaction context on <aDF>,
ready to be opened.

Standard_Boolean TDF_Transaction::IsOpen ( ) const

 Returns true if the transaction is open. <br>


const TCollection_AsciiString& TDF_Transaction::Name ( ) const

 Returns the transaction name. <br>


Standard_Integer TDF_Transaction::Open ( )

 If not yet done, opens a new transaction on <br>
     <myDF>. Returns the index of the just opened <br>
     transaction. <br>


It raises DomainError if the transaction is
already open, and NullObject if there is no
current Data framework.

Standard_Integer TDF_Transaction::Transaction ( ) const

 Returns the number of the transaction opened by <me>. <br>



The documentation for this class was generated from the following file: