From a804510d81ade0594a75b5c9b8765cafcc233245 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Mon, 16 Jul 2012 13:54:11 +0000 Subject: QPID-3858: Refactor to tidy up several class design issues git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1362039 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp') diff --git a/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp b/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp index 29db6ceaf2..889f7a4cdd 100644 --- a/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp +++ b/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp @@ -29,12 +29,21 @@ namespace tests { namespace storePerftools { namespace asyncPerf { +SimpleMessage::SimpleMessage(const char* msgData, + const uint32_t msgSize) : + m_persistenceId(0ULL), + m_msg(msgData, static_cast(msgSize)), + m_store(0), + m_msgHandle(qpid::broker::MessageHandle()) +{} + SimpleMessage::SimpleMessage(const char* msgData, const uint32_t msgSize, - qpid::asyncStore::AsyncStoreImpl* store) : + qpid::broker::AsyncStore* store) : m_persistenceId(0ULL), m_msg(msgData, static_cast(msgSize)), - m_msgHandle(store ? store->createMessageHandle(this) : qpid::broker::MessageHandle(0)) + m_store(store), + m_msgHandle(store ? store->createMessageHandle(this) : qpid::broker::MessageHandle()) {} SimpleMessage::~SimpleMessage() @@ -95,7 +104,7 @@ SimpleMessage::encodedHeaderSize() const bool SimpleMessage::isPersistent() const { - return m_msgHandle.isValid(); + return m_store != 0; } uint64_t -- cgit v1.2.1