The Transaction class This class provides the Transaction implementation. More...
#include "cpp-transaction.h"
Public Member Functions | |
Transaction (void) throw () | |
Transaction Default Constructor. More... | |
Transaction & | operator= (const Transaction &transaction) throw () |
Transaction assignment operator. More... | |
void | _ValidateITransaction () const |
Validate the ITransaction. More... | |
void | End (void) |
End a transaction by committing it. More... | |
void | EndRollback (void) |
End a transaction by rolling it back. More... | |
void | Rollback (void) |
Rollback all changes in a transaction. More... | |
Transaction & | Release (void) |
~Transaction () | |
Transaction destructor. More... | |
Transaction (const Transaction &trans) throw () | |
Constructor. More... | |
Friends | |
class | Db |
The Transaction class This class provides the Transaction implementation.
This is a class with very little overhead - a single pointer - that is a 'smart pointer' (i.e. will automatically get destroyed when the last reference is removed).
To keep the overhead down this class should have no virtual functions.
RDM_CPP::Transaction::Transaction | ( | void | ) | ||
throw | ( | ||||
) |
Transaction Default Constructor.
The default constructor, copy constructor, assignment operator, and destructor implement a smart pointer for the Transaction interface and it's generated subclasses. The number of references to the underlying implementation object will be maintained. When the number of references to an implementation object is down to zero the object will be released.
The default constructor will initialize the number of references to the underlying implementation object to one.
RDM_CPP::Transaction::~Transaction | ( | ) |
Transaction destructor.
The default constructor, copy constructor, assignment operator, and destructor implement a smart pointer for the Transaction interface. The number of references to the underlying implementation object will be maintained. When the number of references to an implementation object is down to zero the object will be released.
The destructor will decrement the number of references to the underlying implementation object by one.
RDM_CPP::Transaction::Transaction | ( | const Transaction & | trans | ) | |
throw | ( | ||||
) |
Constructor.
Applications should not directly create Transaction classes. They should use the Db methods to get a Transaction class.
[in] | trans | an existing Transaction to base this instance on |
void RDM_CPP::Transaction::_ValidateITransaction | ( | ) | const |
Validate the ITransaction.
void RDM_CPP::Transaction::End | ( | void | ) |
End a transaction by committing it.
This method commits the transaction
rdm_exception | (eINVTRANSID) |
void RDM_CPP::Transaction::EndRollback | ( | void | ) |
End a transaction by rolling it back.
This method rolls back the transaction
rdm_exception | (eINVTRANSID) |
Transaction& RDM_CPP::Transaction::operator= | ( | const Transaction & | transaction | ) | |
throw | ( | ||||
) |
Transaction assignment operator.
The default constructor, copy constructor, assignment operator, and destructor implement a smart pointer for the Transaction interface. The number of references to the underlying implementation object will be maintained. When the number of references to an implementation object is down to zero the object will be released.
The assignment operator will increment the number of references to the underlying implementation object by one.
Transaction& RDM_CPP::Transaction::Release | ( | void | ) |
void RDM_CPP::Transaction::Rollback | ( | void | ) |
Rollback all changes in a transaction.
This method rolls back the transaction, but keeps the transaction active and any locks granted when starting the transaction remain in place.
rdm_exception | (eINVTRANSID) |
|
friend |