- // but if you are doing this on intervals, don't forget to make another
- if (repeat) {
- assert(getFlags(IsMainQueue));
- mainEventQueue.schedule(this, curTick + repeat);
- }
+LocalSimLoopExitEvent::LocalSimLoopExitEvent()
+ : Event(Sim_Exit_Pri, IsExitEvent | AutoSerialize),
+ cause(""), code(0), repeat(0)
+{
+}
+
+LocalSimLoopExitEvent::LocalSimLoopExitEvent(const std::string &_cause, int c,
+ Tick r, bool serialize)
+ : Event(Sim_Exit_Pri, IsExitEvent | (serialize ? AutoSerialize : 0)),
+ cause(_cause), code(c), repeat(r)
+{
+}
+
+//
+// handle termination event
+//
+void
+LocalSimLoopExitEvent::process()
+{
+ exitSimLoop(cause, 0);