# ApplicationFramework
TKLCAF
TDF

# 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.
.

`#include <TDF_Transaction.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | TDF_Transaction (const TCollection_AsciiString &aName="")
| Creates an empty transaction context, unable to be opened. .
Standard_EXPORT | TDF_Transaction (const Handle(TDF_Data)&aDF, const TCollection_AsciiString &aName="")
| Creates a transaction context on <adf>, ready to be opened. .
Standard_EXPORT 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. .
Standard_EXPORT Standard_Integer | Open ()
| If not yet done, opens a new transaction on <mydf>. Returns the index of the just opened transaction. It raises DomainError if the transaction is already open, and NullObject if there is no current Data framework. .
Standard_EXPORT Handle_TDF_Delta | Commit (const Standard_Boolean withDelta=Standard_False)
| Commits the transactions until AND including the current opened one. .
Standard_EXPORT void | Abort ()
| Aborts the transactions until AND including the current opened one. .
| ~TDF_Transaction ()
Handle_TDF_Data | Data () const
| Returns the Data from TDF. .
Standard_Integer | Transaction () const
| Returns the number of the transaction opened by <me>. .
Standard_EXPORT const TCollection_AsciiString & | Name () const
| Returns the transaction name. .
Standard_Boolean | IsOpen () const
| Returns true if the transaction is open. .

## Private Member Functions

Standard_EXPORT | TDF_Transaction (const TDF_Transaction &aTrans)
| Private to avoid copy. .

## Private Attributes

Handle_TDF_Data | myDF
Standard_Integer | myUntilTransaction
TCollection_AsciiString | myName

## Constructor & Destructor Documentation

Standard_EXPORT TDF_Transaction::TDF_Transaction | ( | const TCollection_AsciiString & | aName = `""` | ) |

Standard_EXPORT TDF_Transaction::TDF_Transaction | ( | const Handle(TDF_Data)& | aDF,
|  | const TCollection_AsciiString & | aName = `""`
| ) |

TDF_Transaction::~TDF_Transaction | ( |  | ) | `[inline]`

Standard_EXPORT TDF_Transaction::TDF_Transaction | ( | const TDF_Transaction & | aTrans | ) | `[private]`

## Member Function Documentation

Standard_EXPORT void TDF_Transaction::Abort | ( |  | ) |

Standard_EXPORT Handle_TDF_Delta TDF_Transaction::Commit | ( | const Standard_Boolean | withDelta = `Standard_False` | ) |

Handle_TDF_Data TDF_Transaction::Data | ( |  | ) | const

Standard_EXPORT void TDF_Transaction::Initialize | ( | const Handle(TDF_Data)& | aDF | ) |

Standard_Boolean TDF_Transaction::IsOpen | ( |  | ) | const`[inline]`

const TCollection_AsciiString & TDF_Transaction::Name | ( |  | ) | const`[inline]`

Standard_EXPORT Standard_Integer TDF_Transaction::Open | ( |  | ) |

void TDF_Transaction::operator delete | ( | void * | anAddress | ) | `[inline]`

void* TDF_Transaction::operator new | ( | size_t | size | ) | `[inline]`

void* TDF_Transaction::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_Integer TDF_Transaction::Transaction | ( |  | ) | const`[inline]`

## Field Documentation

Handle_TDF_Data TDF_Transaction::myDF`[private]`

TCollection_AsciiString TDF_Transaction::myName`[private]`

Standard_Integer TDF_Transaction::myUntilTransaction`[private]`

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

- TDF_Transaction.hxx
- TDF_Transaction.lxx