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) || defined(RDM_WINCE)
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 
37 #if defined(RDM_WINCE)
38 #pragma warning (push)
39 #pragma warning (disable:4275)
40 #endif
41 
42 
52 class PUBLIC_CLASS RDM_CPP::Transaction
53 {
54 public:
55 /* Handle more than one reference to the underlying database */
56 
68  Transaction (void) throw ();
69 
81  Transaction& operator = (const Transaction& transaction) throw ();
82 
84  void _ValidateITransaction () const;
85 
99  void End (
100  void
101  );
102 
116  void EndRollback (
117  void
118  );
119 
134  void Rollback (
135  void
136  );
137 
151  Transaction& Release (void);
152 
164  ~Transaction ();
165 
171  Transaction (
172  const Transaction& trans
173  ) throw ();
174 
175 #ifndef RDM_DOXYGEN
176 protected:
177  ITransaction *m_itransaction;
178  Transaction (ITransaction *itrans) throw ();
179  RDM_RETCODE GetReturnCode() const;
180 
181 private:
182  const Transaction* operator & (void) const;
183 #endif
184  friend class Db;
185 };
186 
187 #if defined(RDM_WINCE)
188 #pragma warning (pop)
189 #endif
190 #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