Skip to content

Commit

Permalink
7.4.0-rc.3
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum-leaps committed Sep 5, 2024
1 parent 4470078 commit bea51e8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 70 deletions.
2 changes: 1 addition & 1 deletion examples
6 changes: 0 additions & 6 deletions include/qp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -931,9 +928,6 @@ class QMActive : public QP::QActive {
return reinterpret_cast<QMsm *>(this)->QMsm::getStateHandler();
}
#endif // def Q_SPY
bool isInState(QMState const * const st) const noexcept {
return reinterpret_cast<QMsm const *>(this)->QMsm::isInState(st);
}
QMState const * childStateObj(QMState const * const parent) const noexcept {
return reinterpret_cast<QMsm const *>(this)
->QMsm::childStateObj(parent);
Expand Down
36 changes: 1 addition & 35 deletions qpcpp.qm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -1347,33 +1347,6 @@ QF_CRIT_ENTRY();
Q_ENSURE_INCRIT(490, lbound &gt; 0);
QF_CRIT_EXIT();

return inState;</code>
</operation>
<!--${QEP::QMsm::isInState}-->
<operation name="isInState" type="bool" visibility="0x00" properties="0x00">
<specifiers>const noexcept</specifiers>
<documentation>//! @deprecated instead use: QMsm::isIn()</documentation>
<!--${QEP::QMsm::isInState::stateObj}-->
<parameter name="stateObj" type="QMState const * const"/>
<code>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) &amp;&amp; (lbound &gt; 0); --lbound) {
if (s == stateObj) { // match found?
inState = true;
break;
}
else {
s = s-&gt;superstate; // advance to the superstate
}
}

QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_ENSURE_INCRIT(590, lbound &gt; 0);
QF_CRIT_EXIT();

return inState;</code>
</operation>
<!--${QEP::QMsm::childStateObj}-->
Expand Down Expand Up @@ -2941,13 +2914,6 @@ m_temp.fun = initial;</code>
<specifiers>noexcept override</specifiers>
<code>return reinterpret_cast&lt;QMsm *&gt;(this)-&gt;QMsm::getStateHandler();</code>
</operation>
<!--${QF::QMActive::isInState}-->
<operation name="isInState" type="bool" visibility="0x00" properties="0x02">
<specifiers>const noexcept</specifiers>
<!--${QF::QMActive::isInState::st}-->
<parameter name="st" type="QMState const * const"/>
<code>return reinterpret_cast&lt;QMsm const *&gt;(this)-&gt;QMsm::isInState(st);</code>
</operation>
<!--${QF::QMActive::childStateObj}-->
<operation name="childStateObj" type="QMState const *" visibility="0x00" properties="0x02">
<specifiers>const noexcept</specifiers>
Expand Down
6 changes: 3 additions & 3 deletions qpcpp.sha1
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
26 changes: 1 addition & 25 deletions src/qf/qep_msm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bea51e8

Please sign in to comment.