|
@@ -84,7 +84,8 @@ public:
|
|
|
|
|
|
virtual bool event(const typename Time::type & /* t */, int /* event */) = 0;
|
|
virtual bool event(const typename Time::type & /* t */, int /* event */) = 0;
|
|
|
|
|
|
- virtual bool guard(const typename Time::type & /* t */) const = 0;
|
|
|
|
|
|
+ virtual bool guard(const typename Time::type & /* t */,
|
|
|
|
+ const artis::common::event::Value & /* value */) const = 0;
|
|
|
|
|
|
virtual bool no_event() const = 0;
|
|
virtual bool no_event() const = 0;
|
|
|
|
|
|
@@ -105,7 +106,8 @@ public:
|
|
bool event(const typename Time::type & /* t */,
|
|
bool event(const typename Time::type & /* t */,
|
|
int /* event */) override { return false; }
|
|
int /* event */) override { return false; }
|
|
|
|
|
|
- bool guard(const typename Time::type & /* t */) const override { return true; }
|
|
|
|
|
|
+ bool guard(const typename Time::type & /* t */,
|
|
|
|
+ const artis::common::event::Value & /* value */) const override { return true; }
|
|
|
|
|
|
bool no_event() const override { return false; }
|
|
bool no_event() const override { return false; }
|
|
|
|
|
|
@@ -187,7 +189,7 @@ public:
|
|
std::for_each(it->second.cbegin(), it->second.cend(),
|
|
std::for_each(it->second.cbegin(), it->second.cend(),
|
|
[t, &unique, &select, &stateID](
|
|
[t, &unique, &select, &stateID](
|
|
const std::pair<std::unique_ptr<AbstractTransition>, int> &e) {
|
|
const std::pair<std::unique_ptr<AbstractTransition>, int> &e) {
|
|
- if (e.first->no_event() and e.first->guard(t)) {
|
|
|
|
|
|
+ if (e.first->no_event() and e.first->guard(t, {})) {
|
|
select = e.first.get();
|
|
select = e.first.get();
|
|
stateID = e.second;
|
|
stateID = e.second;
|
|
++unique;
|
|
++unique;
|
|
@@ -221,7 +223,7 @@ public:
|
|
std::for_each(it->second.cbegin(), it->second.cend(),
|
|
std::for_each(it->second.cbegin(), it->second.cend(),
|
|
[t, event, &unique, &select, &stateID](
|
|
[t, event, &unique, &select, &stateID](
|
|
const std::pair<std::unique_ptr<AbstractTransition>, int> &e) {
|
|
const std::pair<std::unique_ptr<AbstractTransition>, int> &e) {
|
|
- if (e.first->guard(t) and e.first->event(t, event.id)) {
|
|
|
|
|
|
+ if (e.first->guard(t, event.data) and e.first->event(t, event.id)) {
|
|
select = e.first.get();
|
|
select = e.first.get();
|
|
stateID = e.second;
|
|
stateID = e.second;
|
|
++unique;
|
|
++unique;
|
|
@@ -255,7 +257,7 @@ public:
|
|
std::for_each(it->second.cbegin(), it->second.cend(),
|
|
std::for_each(it->second.cbegin(), it->second.cend(),
|
|
[t, event, &unique, &select, &stateID](
|
|
[t, event, &unique, &select, &stateID](
|
|
const std::pair<std::unique_ptr<AbstractTransition>, int> &e) {
|
|
const std::pair<std::unique_ptr<AbstractTransition>, int> &e) {
|
|
- if (e.first->guard(t) and e.first->event(t, event.id)) {
|
|
|
|
|
|
+ if (e.first->guard(t, event.data) and e.first->event(t, event.id)) {
|
|
select = e.first.get();
|
|
select = e.first.get();
|
|
stateID = e.second;
|
|
stateID = e.second;
|
|
++unique;
|
|
++unique;
|