diff --git a/examples b/examples index 1d4093e9..3ba405ac 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 1d4093e9c95bbb3ec438d57fbc06c36361599ea4 +Subproject commit 3ba405ac6fdc2d31b451ebf3b9dd329ca025311c diff --git a/include/qp.hpp b/include/qp.hpp index a5615ba3..b57e9540 100644 --- a/include/qp.hpp +++ b/include/qp.hpp @@ -438,9 +438,6 @@ class QMsm : public QP::QAsm { } #endif // def Q_SPY bool isIn(QStateHandler const state) noexcept override; - - //! @deprecated instead use: QMsm::isIn() - bool isInState(QMState const * const stateObj) const noexcept; QMState const * childStateObj(QMState const * const parent) const noexcept; private: @@ -931,9 +928,6 @@ class QMActive : public QP::QActive { return reinterpret_cast(this)->QMsm::getStateHandler(); } #endif // def Q_SPY - bool isInState(QMState const * const st) const noexcept { - return reinterpret_cast(this)->QMsm::isInState(st); - } QMState const * childStateObj(QMState const * const parent) const noexcept { return reinterpret_cast(this) ->QMsm::childStateObj(parent); diff --git a/qpcpp.qm b/qpcpp.qm index 1c4831ee..0e8c2ac7 100644 --- a/qpcpp.qm +++ b/qpcpp.qm @@ -1156,7 +1156,7 @@ do { else if (r == Q_RET_SUPER_SUB) { t = m_temp.obj; // current host state of the submachie } - else { // event unhandled due to a guard? + else { // event unhandled due to a guard QF_CRIT_ENTRY(); // event must be unhandled due to a guard evaluating to 'false' Q_ASSERT_INCRIT(310, r == Q_RET_UNHANDLED); @@ -1347,33 +1347,6 @@ QF_CRIT_ENTRY(); Q_ENSURE_INCRIT(490, lbound > 0); QF_CRIT_EXIT(); -return inState; - - - - const noexcept - //! @deprecated instead use: QMsm::isIn() - - - bool inState = false; // assume that this SM is not in 'state' - -QMState const *s = m_state.obj; -std::int_fast8_t lbound = QMSM_MAX_NEST_DEPTH_; // fixed upper loop bound -for (; (s != nullptr) && (lbound > 0); --lbound) { - if (s == stateObj) { // match found? - inState = true; - break; - } - else { - s = s->superstate; // advance to the superstate - } -} - -QF_CRIT_STAT -QF_CRIT_ENTRY(); -Q_ENSURE_INCRIT(590, lbound > 0); -QF_CRIT_EXIT(); - return inState; @@ -2941,13 +2914,6 @@ m_temp.fun = initial; noexcept override return reinterpret_cast<QMsm *>(this)->QMsm::getStateHandler(); - - - const noexcept - - - return reinterpret_cast<QMsm const *>(this)->QMsm::isInState(st); - const noexcept diff --git a/qpcpp.sha1 b/qpcpp.sha1 index 55184e00..44ba1901 100644 --- a/qpcpp.sha1 +++ b/qpcpp.sha1 @@ -1,8 +1,8 @@ -b741762e30f27d4c7ab5c8ead0c70d675113c1f7 *qpcpp.qm +177ecb5725a327d05728c48484a164e43a407045 *qpcpp.qm 2e6071600db5ae5eace4cc524f9ed4f5310056ce *include/qequeue.hpp 2ae88474c60e5ae739bafc1131f54ce9f1bba25b *include/qk.hpp 8c49c0fb49ede99f2277e70e9340709a65d15f85 *include/qmpool.hpp -89cb103f9c4ef181b02e5937682538b6efd2803a *include/qp.hpp +16e02c12f65e037960d3994379aeddc618fba499 *include/qp.hpp c25d74292c78eb2af68fe8c39e854141d739fba1 *include/qp_pkg.hpp eef6f6b93ce2066f02be0217d4953045ce102878 *include/qpcpp.hpp 9bf9ae3586f8828c372ab79771839bd3c76e5b5e *include/qs.hpp @@ -14,7 +14,7 @@ b6b1f1c52727bec4c6a50b030ad9277f93ac0eee *include/qs_dummy.hpp 0648d5e24f1954beef908b7fc57e344b01643d14 *include/qxk.hpp 71899ce74eeb04f333ed00d53f87719f722a39ab *src/qf/CMakeLists.txt 55c2256457431d6b7c2024ec934a52a33cc4e5ce *src/qf/qep_hsm.cpp -ae443cd0da18d7cd14598a6e6646d86000a2591a *src/qf/qep_msm.cpp +4c49ee7b7b1f1cffc07e8e3c6677d279f3861c83 *src/qf/qep_msm.cpp 20e2a785f80fc9839b7f2774e64ec5414929e918 *src/qf/qf_act.cpp 23569b7f1e7ec95d32b13288be4793d303ad2a73 *src/qf/qf_actq.cpp 3a916b17accb3aea38ec52832e69646173ccd742 *src/qf/qf_defer.cpp diff --git a/src/qf/qep_msm.cpp b/src/qf/qep_msm.cpp index 700baa13..3742adec 100644 --- a/src/qf/qep_msm.cpp +++ b/src/qf/qep_msm.cpp @@ -209,7 +209,7 @@ void QMsm::dispatch( else if (r == Q_RET_SUPER_SUB) { t = m_temp.obj; // current host state of the submachie } - else { // event unhandled due to a guard? + else { // event unhandled due to a guard QF_CRIT_ENTRY(); // event must be unhandled due to a guard evaluating to 'false' Q_ASSERT_INCRIT(310, r == Q_RET_UNHANDLED); @@ -396,30 +396,6 @@ bool QMsm::isIn(QStateHandler const state) noexcept { return inState; } -//${QEP::QMsm::isInState} .................................................... -bool QMsm::isInState(QMState const * const stateObj) const noexcept { - bool inState = false; // assume that this SM is not in 'state' - - QMState const *s = m_state.obj; - std::int_fast8_t lbound = QMSM_MAX_NEST_DEPTH_; // fixed upper loop bound - for (; (s != nullptr) && (lbound > 0); --lbound) { - if (s == stateObj) { // match found? - inState = true; - break; - } - else { - s = s->superstate; // advance to the superstate - } - } - - QF_CRIT_STAT - QF_CRIT_ENTRY(); - Q_ENSURE_INCRIT(590, lbound > 0); - QF_CRIT_EXIT(); - - return inState; -} - //${QEP::QMsm::childStateObj} ................................................ QMState const * QMsm::childStateObj(QMState const * const parent) const noexcept { QMState const *child = m_state.obj;