summaryrefslogtreecommitdiff
path: root/cpp/src/tests/storePerftools/asyncPerf/TransactionAsyncContext.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2012-05-14 15:50:27 +0000
committerKim van der Riet <kpvdr@apache.org>2012-05-14 15:50:27 +0000
commit22c507ad66f2101c6d3f46207344746ec3b6e36c (patch)
tree46b3a7c916e26ca55c6aa6cc15873661ce8b1002 /cpp/src/tests/storePerftools/asyncPerf/TransactionAsyncContext.cpp
parent1416b27f148e334d2751ff9a7cf59d6b0f022a14 (diff)
downloadqpid-python-22c507ad66f2101c6d3f46207344746ec3b6e36c.tar.gz
QPID-3858: More restructuring: extracted MessageContext from MockPersistableMessage, also TransactionAsyncContext from MockTransactionContext. Further name changes will be needed to resolve some bad naming.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1338262 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/storePerftools/asyncPerf/TransactionAsyncContext.cpp')
-rw-r--r--cpp/src/tests/storePerftools/asyncPerf/TransactionAsyncContext.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/cpp/src/tests/storePerftools/asyncPerf/TransactionAsyncContext.cpp b/cpp/src/tests/storePerftools/asyncPerf/TransactionAsyncContext.cpp
new file mode 100644
index 0000000000..c0c94e3a18
--- /dev/null
+++ b/cpp/src/tests/storePerftools/asyncPerf/TransactionAsyncContext.cpp
@@ -0,0 +1,43 @@
+#include "TransactionAsyncContext.h"
+
+namespace tests {
+namespace storePerftools {
+namespace asyncPerf {
+
+TransactionAsyncContext::TransactionAsyncContext(MockTransactionContext* tc,
+ const qpid::asyncStore::AsyncOperation::opCode op):
+ qpid::broker::BrokerContext(),
+ m_tc(tc),
+ m_op(op)
+{
+ assert(tc != 0);
+}
+
+TransactionAsyncContext::~TransactionAsyncContext()
+{}
+
+qpid::asyncStore::AsyncOperation::opCode
+TransactionAsyncContext::getOpCode() const
+{
+ return m_op;
+}
+
+const char*
+TransactionAsyncContext::getOpStr() const
+{
+ return qpid::asyncStore::AsyncOperation::getOpStr(m_op);
+}
+
+MockTransactionContext*
+TransactionAsyncContext::getTransactionContext() const
+{
+ return m_tc;
+}
+
+void
+TransactionAsyncContext::destroy()
+{
+ delete this;
+}
+
+}}} // namespace tests::storePerftools::asyncPerf