Skip to content

Commit 45bcb48

Browse files
committed
Option to pass event data
1 parent 3009716 commit 45bcb48

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Include/scxmlexternmonitor2.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Scxmlmonitor {
1111

12-
static const std::size_t SCXML_MONITOR_VERSION = 0x08;
12+
static const std::size_t SCXML_MONITOR_VERSION = 0x09;
1313

1414
/* External SCXML monitor for ScxmlEditor */
1515
/* See 'https://github.com/alexzhornyak/ScxmlEditor-Tutorial' */
@@ -170,6 +170,10 @@ class IScxmlExternMonitor: public QObject {
170170
}
171171
}
172172

173+
inline virtual void processEventMessage(QScxmlStateMachine *machine, const QString &id, const QScxmlEvent &event) {
174+
processMonitorMessage(machine->name(), id, event.name(), smttBeforeTakingTransition);
175+
}
176+
173177
private slots:
174178

175179
inline void onInvokedServicesChanged(const QVector<QScxmlInvokableService *> &) {
@@ -257,7 +261,7 @@ private slots:
257261
auto itInvoked = _invokedMachines.constFind(machine);
258262
const QString id = itInvoked == _invokedMachines.cend() ?
259263
this->_machineID : std::get<InvType::Id>(itInvoked.value());
260-
processMonitorMessage(machine->name(), id, event.name(), smttBeforeTakingTransition);
264+
processEventMessage(machine, id, event);
261265
});
262266
_scxmlConnections.append(eventconnection);
263267

0 commit comments

Comments
 (0)