summaryrefslogtreecommitdiff
path: root/src/client-test-app.cpp
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2013-04-26 02:13:50 -0700
committerPatrick Ohly <patrick.ohly@intel.com>2013-05-13 17:49:50 +0200
commit9a3b17b82a1e5ecce56406c0be6af4d9e4b9d33f (patch)
tree5c02bc1536056b55bc1f6ccba522e0fd17774faa /src/client-test-app.cpp
parent05fb1aebc3242c0cf734f18f0582df8cb05e0999 (diff)
engine: eliminate virtual checkForSuspend/Abort()
Since the introduction of SuspendFlags, the ony remaining user of the virtual aspect of checkForSuspend/checkForAbort() was the testing code. By using the suspend/abort request mechanism in SuspendFlags, it becomes possible to move checkForSuspend/Abort() into SuspendFlags itself. This will be useful to use it outside of a SyncContext member.
Diffstat (limited to 'src/client-test-app.cpp')
-rw-r--r--src/client-test-app.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client-test-app.cpp b/src/client-test-app.cpp
index f2607bbc..c0a13f1c 100644
--- a/src/client-test-app.cpp
+++ b/src/client-test-app.cpp
@@ -382,7 +382,7 @@ public:
SyncContext::prepare();
if (m_options.m_prepareCallback &&
m_options.m_prepareCallback(*this, m_options)) {
- m_options.m_isAborted = true;
+ m_options.m_isAborted = SuspendFlags::getSuspendFlags().abort();
}
}
@@ -392,14 +392,11 @@ public:
if (!m_started) {
m_started = true;
if (m_options.m_startCallback(*this, m_options)) {
- m_options.m_isAborted = true;
+ m_options.m_isAborted = SuspendFlags::getSuspendFlags().abort();
}
}
}
- virtual bool checkForAbort() { return m_options.m_isAborted; }
- virtual bool checkForSuspend() {return m_options.m_isSuspended;}
-
virtual boost::shared_ptr<TransportAgent> createTransportAgent()
{
boost::shared_ptr<TransportAgent>wrapper = m_options.m_transport;