simulator.resume() should resume even if no listeners active

The experiment developer has full control over the number of active
listeners.  simulator.resume() therefore should resume simulation even if
it won't ever return.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1574 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-08-28 09:06:50 +00:00
parent 56a7c2b57b
commit cfddb311f6
2 changed files with 4 additions and 6 deletions

View File

@ -21,8 +21,6 @@ bool SimulatorController::addListener(BaseListener* li)
BaseListener* SimulatorController::resume(void) BaseListener* SimulatorController::resume(void)
{ {
if (!hasListeners())
return NULL;
m_Flows.resume(); m_Flows.resume();
assert(m_LstList.getLastFired() != NULL && assert(m_LstList.getLastFired() != NULL &&
"FATAL ERROR: getLastFired() expected to be non-NULL!"); "FATAL ERROR: getLastFired() expected to be non-NULL!");

View File

@ -202,10 +202,10 @@ public:
void clearListeners(ExperimentFlow *flow = 0) { m_LstList.remove(flow); } void clearListeners(ExperimentFlow *flow = 0) { m_LstList.remove(flow); }
/** /**
* Switches the control flow to the simulator and waits on any listeners * Switches the control flow to the simulator and waits on any listeners
* which have been added to the listener management. If one of those listeners * which have been added to the listener management. If one of those listeners
* occurs, resume() will return the pointer of that listener. * occurs, resume() will return the pointer of that listener. If there are
* @return the previously occurred listener, or \c NULL if there are no * no more active listeners for this experiment, resume() never returns.
* listeners to wait for * @return the previously occurred listener
*/ */
BaseListener* resume(); BaseListener* resume();
/** /**