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 }
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 (
94  void
95  );
96 
110  void EndRollback (
111  void
112  );
113 
128  void Rollback (
129  void
130  );
131 
145  Transaction& Release (void);
146 
158  ~Transaction ();
159 
165  Transaction (
166  const Transaction& trans
167  ) throw ();
168 
169 #ifndef RDM_DOXYGEN
170 protected:
171  ITransaction *m_itransaction;
172  Transaction (ITransaction *itrans) throw ();
173  RDM_RETCODE GetReturnCode() const;
174 
175 private:
176  const Transaction* operator & (void) const;
177 #endif
178  friend class Db;
179 };
180 
181 #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