Products Support Documentation Download
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...
 
Transactionoperator= (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...
 
TransactionRelease (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.

Definition at line 52 of file cpp-transaction.h.

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]transan 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)
Library
rdmcpp-12
Examples:
tutorials/HelloWorldCPP/hello_worldCPPTutorial_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)
Library
rdmcpp-12

◆ 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)
Library
rdmcpp-12

Friends And Related Function Documentation

◆ Db

friend class Db
friend

Definition at line 184 of file cpp-transaction.h.


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