RDM_CPP::Transaction Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

Transaction() [1/2]

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.

~Transaction()

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.

Transaction() [2/2]

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.

Parameters
[in] trans an existing Transaction to base this instance on

Member Function Documentation

_ValidateITransaction()

void RDM_CPP::Transaction::_ValidateITransaction ( ) const

Validate the ITransaction.

End()

void RDM_CPP::Transaction::End ( void )

End a transaction by committing it.

This method commits the transaction

Locking Requirements in Shared/Shared-Strict Modes
None
Exceptions
rdm_exception (eINVTRANSID)
Examples
cpp01Example_main.cpp.

EndRollback()

void RDM_CPP::Transaction::EndRollback ( void )

End a transaction by rolling it back.

This method rolls back the transaction

Locking Requirements in Shared/Shared-Strict Modes
None
Exceptions
rdm_exception (eINVTRANSID)

operator=()

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.

Release()

Transaction& RDM_CPP::Transaction::Release ( void )

Rollback()

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.

Locking Requirements in Shared/Shared-Strict Modes
None
Exceptions
rdm_exception (eINVTRANSID)

Friends And Related Function Documentation

Db

friend class Db
friend

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