diff options
author | Bernard Normier <bernard@zeroc.com> | 2003-09-16 01:41:46 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2003-09-16 01:41:46 +0000 |
commit | 83cb29a8de333646c9b3e7ac6909accce72e6b5f (patch) | |
tree | cc1037886e0d1770d9c1ad412d79c81a5a1d21ad /cpp/src/Freeze/TransactionI.h | |
parent | flex fixes (diff) | |
download | ice-83cb29a8de333646c9b3e7ac6909accce72e6b5f.tar.bz2 ice-83cb29a8de333646c9b3e7ac6909accce72e6b5f.tar.xz ice-83cb29a8de333646c9b3e7ac6909accce72e6b5f.zip |
Added Freeze Connection and Transaction
Diffstat (limited to 'cpp/src/Freeze/TransactionI.h')
-rw-r--r-- | cpp/src/Freeze/TransactionI.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/cpp/src/Freeze/TransactionI.h b/cpp/src/Freeze/TransactionI.h new file mode 100644 index 00000000000..e3e4e73ef9f --- /dev/null +++ b/cpp/src/Freeze/TransactionI.h @@ -0,0 +1,59 @@ +// ********************************************************************** +// +// Copyright (c) 2003 +// ZeroC, Inc. +// Billerica, MA, USA +// +// All Rights Reserved. +// +// Ice is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License version 2 as published by +// the Free Software Foundation. +// +// ********************************************************************** + +#ifndef FREEZE_TRANSACTIONI_H +#define FREEZE_TRANSACTIONI_H + +#include <Freeze/Transaction.h> +#include <db_cxx.h> + +namespace Freeze +{ + +class ConnectionI; +typedef IceUtil::Handle<ConnectionI> ConnectionIPtr; + +class TransactionI : public Transaction +{ +public: + + virtual void + commit(); + + virtual void + rollback(); + + TransactionI(ConnectionI*); + + ~TransactionI(); + + DbTxn* + dbTxn() const + { + return _txn; + } + +private: + + void + cleanup(); + + ConnectionIPtr _connection; + DbTxn* _txn; +}; + +typedef IceUtil::Handle<TransactionI> TransactionIPtr; + +} +#endif |