Products Support Documentation Download
cpp-transaction.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  *
3  * Raima Database Manager
4  *
5  * Copyright (c) 2011 Raima Inc., All rights reserved.
6  *
7  * Use of this software, whether in source code format, or in executable,
8  * binary object code form, is governed by the Birdstep LICENSE which
9  * is fully described in the LICENSE.TXT file, included within this
10  * distribution of files.
11  *
12  * ----------------------------------------------------------------------------
13  */
14 
19 #ifndef CPP_TRANSACTION_H
20 #define CPP_TRANSACTION_H
21 
22 #if !defined(__cplusplus)
23 #error cpp-transaction.h is only for C++ applications. Do not include it in C applications
24 #endif
25 
26 #if defined(RDM_WINDOWS)
27 #pragma warning(disable : 4290)
28 #endif
29 
30 #include "psptypes.h"
31 #include "rdmretcodetypes.h"
32 namespace RDM_CPP {
33  class ITransaction;
34  class Transaction;
35 } // namespace RDM_CPP
36 
46 class PUBLIC_CLASS RDM_CPP::Transaction
47 {
48  public:
49  /* Handle more than one reference to the underlying database */
50 
62  Transaction (void) throw ();
63 
75  Transaction &operator= (const Transaction &transaction) throw ();
76 
78  void _ValidateITransaction () const;
79 
93  void End (void);
94 
108  void EndRollback (void);
109 
124  void Rollback (void);
125 
139  Transaction &Release (void);
140 
152  ~Transaction ();
153 
159  Transaction (
160  const Transaction
161  &trans
162  ) throw ();
163 
164 #ifndef RDM_DOXYGEN
165  protected:
166  ITransaction *m_itransaction;
167  Transaction (ITransaction *itrans) throw ();
168  RDM_RETCODE GetReturnCode () const;
169 
170  private:
171  const Transaction *operator& (void) const;
172 #endif
173  friend class Db;
174 };
175 
176 #endif
Header for the Platform Support Package - Platform dependent types.
RDM Status and Error Return Codes.
The Db base class.
Definition: cpp-db.h:52
The Transaction class This class provides the Transaction implementation.
RDM_RETCODE
RDM status and error return codes.
The RDM C++ Namespace.
Definition: cpp-cursor.h:27