mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-14 05:42:57 +08:00
7.3.5-rc.2
This commit is contained in:
parent
4028ad2dd6
commit
2dd72836be
2
examples
2
examples
@ -1 +1 @@
|
||||
Subproject commit 4c76095e91087b69c97ce5e602690210a97893af
|
||||
Subproject commit 7cb437b967372eedcde78f778680547406f21737
|
@ -44,7 +44,7 @@
|
||||
#define QP_HPP_
|
||||
|
||||
//============================================================================
|
||||
#define QP_VERSION_STR "7.3.5-rc.1"
|
||||
#define QP_VERSION_STR "7.3.5-rc.2"
|
||||
#define QP_VERSION 735U
|
||||
#define QP_RELEASE 0x70A1DEF0U
|
||||
|
||||
@ -150,7 +150,7 @@ public:
|
||||
public:
|
||||
|
||||
#ifdef QEVT_DYN_CTOR
|
||||
QEvt * ctor(DynEvt const dummy) noexcept;
|
||||
void ctor(DynEvt const dummy) noexcept;
|
||||
#endif // def QEVT_DYN_CTOR
|
||||
explicit constexpr QEvt(QSignal const s) noexcept
|
||||
: sig(s),
|
||||
@ -1144,6 +1144,72 @@ QEvt * newXfromISR_(
|
||||
void gcFromISR(QEvt const * e) noexcept;
|
||||
#endif // def QF_ISR_API
|
||||
|
||||
//${QF::QF-dyn::q_new} .......................................................
|
||||
#ifndef QEVT_DYN_CTOR
|
||||
template<class evtT_>
|
||||
inline evtT_ * q_new(enum_t const sig) {
|
||||
return static_cast<evtT_*>(
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, sig));
|
||||
}
|
||||
#endif // ndef QEVT_DYN_CTOR
|
||||
|
||||
//${QF::QF-dyn::q_new} .......................................................
|
||||
#ifdef QEVT_DYN_CTOR
|
||||
template<class evtT_, typename... Args>
|
||||
inline evtT_ * q_new(
|
||||
enum_t const sig,
|
||||
Args... args)
|
||||
{
|
||||
evtT_ *e = static_cast<evtT_*>(
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, sig));
|
||||
e->ctor(args...); // e cannot be nullptr
|
||||
return e;
|
||||
}
|
||||
#endif // def QEVT_DYN_CTOR
|
||||
|
||||
//${QF::QF-dyn::q_new_x} .....................................................
|
||||
#ifndef QEVT_DYN_CTOR
|
||||
template<class evtT_>
|
||||
inline evtT_ * q_new_x(
|
||||
std::uint_fast16_t const margin,
|
||||
enum_t const sig)
|
||||
{
|
||||
return static_cast<evtT_*>(QP::QF::newX_(sizeof(evtT_), margin, sig));
|
||||
}
|
||||
#endif // ndef QEVT_DYN_CTOR
|
||||
|
||||
//${QF::QF-dyn::q_new_x} .....................................................
|
||||
#ifdef QEVT_DYN_CTOR
|
||||
template<class evtT_, typename... Args>
|
||||
inline evtT_ * q_new_x(
|
||||
std::uint_fast16_t const margin,
|
||||
enum_t const sig,
|
||||
Args... args)
|
||||
{
|
||||
evtT_ *e = static_cast<evtT_*>(QP::QF::newX_(sizeof(evtT_), margin, sig));
|
||||
if (e != nullptr) {
|
||||
e->ctor(args...);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
#endif // def QEVT_DYN_CTOR
|
||||
|
||||
//${QF::QF-dyn::q_new_ref} ...................................................
|
||||
template<class evtT_>
|
||||
inline void q_new_ref(
|
||||
QP::QEvt const * const e,
|
||||
evtT_ const *& evtRef)
|
||||
{
|
||||
evtRef = static_cast<evtT_ const *>(QP::QF::newRef_(e, evtRef));
|
||||
}
|
||||
|
||||
//${QF::QF-dyn::q_delete_ref} ................................................
|
||||
template<class evtT_>
|
||||
inline void q_delete_ref(evtT_ const *& evtRef) {
|
||||
QP::QF::deleteRef_(evtRef);
|
||||
evtRef = nullptr;
|
||||
}
|
||||
|
||||
} // namespace QF
|
||||
} // namespace QP
|
||||
//$enddecl${QF::QF-dyn} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -1168,36 +1234,31 @@ void QF_onContextSw(
|
||||
|
||||
//${QF-macros::Q_NEW} ........................................................
|
||||
#ifndef QEVT_DYN_CTOR
|
||||
#define Q_NEW(evtT_, sig_) (static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, (sig_))))
|
||||
#define Q_NEW(evtT_, sig_) (QP::QF::q_new<evtT_>((sig_)))
|
||||
#endif // ndef QEVT_DYN_CTOR
|
||||
|
||||
//${QF-macros::Q_NEW} ........................................................
|
||||
#ifdef QEVT_DYN_CTOR
|
||||
#define Q_NEW(evtT_, sig_, ...) ( static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, (sig_)))->ctor(__VA_ARGS__))
|
||||
#define Q_NEW(evtT_, sig_, ...) (QP::QF::q_new<evtT_>((sig_), __VA_ARGS__))
|
||||
#endif // def QEVT_DYN_CTOR
|
||||
|
||||
//${QF-macros::Q_NEW_X} ......................................................
|
||||
#ifndef QEVT_DYN_CTOR
|
||||
#define Q_NEW_X(evtT_, margin_, sig_) (static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), (margin_), (sig_))))
|
||||
#define Q_NEW_X(evtT_, margin_, sig_) (QP::QF::q_new_x<evtT_>((margin_), (sig_)))
|
||||
#endif // ndef QEVT_DYN_CTOR
|
||||
|
||||
//${QF-macros::Q_NEW_X} ......................................................
|
||||
#ifdef QEVT_DYN_CTOR
|
||||
#define Q_NEW_X(evtT_, margin_, sig_, ...) ( static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), (margin_), (sig_)))->ctor(__VA_ARGS__))
|
||||
#define Q_NEW_X(evtT_, margin_, sig_, ...) (QP::QF::q_new_x<evtT_>((margin_), (sig_), __VA_ARGS__))
|
||||
#endif // def QEVT_DYN_CTOR
|
||||
|
||||
//${QF-macros::Q_NEW_REF} ....................................................
|
||||
#define Q_NEW_REF(evtRef_, evtT_) \
|
||||
((evtRef_) = static_cast<evtT_ const *>(QP::QF::newRef_(e, (evtRef_))))
|
||||
#define Q_NEW_REF(evtRef_, evtT_) (QP::QF::q_new_ref<evtT_>(e, (evtRef_)))
|
||||
|
||||
//${QF-macros::Q_DELETE_REF} .................................................
|
||||
#define Q_DELETE_REF(evtRef_) do { \
|
||||
QP::QF::deleteRef_((evtRef_)); \
|
||||
(evtRef_) = 0U; \
|
||||
(evtRef_) = nullptr; \
|
||||
} while (false)
|
||||
|
||||
//${QF-macros::PUBLISH} ......................................................
|
||||
|
79
qpcpp.qm
79
qpcpp.qm
@ -80,12 +80,11 @@ Contact information:
|
||||
<code>: std::uint8_t { DYNAMIC };</code>
|
||||
</attribute>
|
||||
<!--${QEP::QEvt::ctor}-->
|
||||
<operation name="ctor?def QEVT_DYN_CTOR" type="QEvt *" visibility="0x00" properties="0x00">
|
||||
<operation name="ctor?def QEVT_DYN_CTOR" type="void" visibility="0x00" properties="0x00">
|
||||
<specifiers>noexcept</specifiers>
|
||||
<!--${QEP::QEvt::ctor::dummy}-->
|
||||
<parameter name="dummy" type="DynEvt const"/>
|
||||
<code>Q_UNUSED_PAR(dummy);
|
||||
return this;</code>
|
||||
<code>Q_UNUSED_PAR(dummy);</code>
|
||||
</operation>
|
||||
<!--${QEP::QEvt::QEvt}-->
|
||||
<operation name="QEvt" type="explicit constexpr" visibility="0x00" properties="0x02">
|
||||
@ -4366,6 +4365,61 @@ gc(evtRef); // recycle the referenced event
|
||||
<!--${QF::QF-dyn::gcFromISR::e}-->
|
||||
<parameter name="e" type="QEvt const *"/>
|
||||
</operation>
|
||||
<!--${QF::QF-dyn::q_new}-->
|
||||
<operation name="q_new?ndef QEVT_DYN_CTOR" type="template<class evtT_> evtT_ *" visibility="0x00" properties="0x02">
|
||||
<!--${QF::QF-dyn::q_new::sig}-->
|
||||
<parameter name="sig" type="enum_t const"/>
|
||||
<code>return static_cast<evtT_*>(
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, sig));</code>
|
||||
</operation>
|
||||
<!--${QF::QF-dyn::q_new}-->
|
||||
<operation name="q_new?def QEVT_DYN_CTOR" type="template<class evtT_, typename... Args> evtT_ *" visibility="0x00" properties="0x02">
|
||||
<!--${QF::QF-dyn::q_new::sig}-->
|
||||
<parameter name="sig" type="enum_t const"/>
|
||||
<!--${QF::QF-dyn::q_new::args}-->
|
||||
<parameter name="args" type="Args..."/>
|
||||
<code>evtT_ *e = static_cast<evtT_*>(
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, sig));
|
||||
e->ctor(args...); // e cannot be nullptr
|
||||
return e;</code>
|
||||
</operation>
|
||||
<!--${QF::QF-dyn::q_new_x}-->
|
||||
<operation name="q_new_x?ndef QEVT_DYN_CTOR" type="template<class evtT_> evtT_ *" visibility="0x00" properties="0x02">
|
||||
<!--${QF::QF-dyn::q_new_x::margin}-->
|
||||
<parameter name="margin" type="std::uint_fast16_t const"/>
|
||||
<!--${QF::QF-dyn::q_new_x::sig}-->
|
||||
<parameter name="sig" type="enum_t const"/>
|
||||
<code>return static_cast<evtT_*>(QP::QF::newX_(sizeof(evtT_), margin, sig));</code>
|
||||
</operation>
|
||||
<!--${QF::QF-dyn::q_new_x}-->
|
||||
<operation name="q_new_x?def QEVT_DYN_CTOR" type="template<class evtT_, typename... Args> evtT_ *" visibility="0x00" properties="0x02">
|
||||
<!--${QF::QF-dyn::q_new_x::margin}-->
|
||||
<parameter name="margin" type="std::uint_fast16_t const"/>
|
||||
<!--${QF::QF-dyn::q_new_x::sig}-->
|
||||
<parameter name="sig" type="enum_t const"/>
|
||||
<!--${QF::QF-dyn::q_new_x::args}-->
|
||||
<parameter name="args" type="Args..."/>
|
||||
<code>evtT_ *e = static_cast<evtT_*>(QP::QF::newX_(sizeof(evtT_), margin, sig));
|
||||
if (e != nullptr) {
|
||||
e->ctor(args...);
|
||||
}
|
||||
return e;</code>
|
||||
</operation>
|
||||
<!--${QF::QF-dyn::q_new_ref}-->
|
||||
<operation name="q_new_ref" type="template<class evtT_> void" visibility="0x00" properties="0x02">
|
||||
<!--${QF::QF-dyn::q_new_ref::e}-->
|
||||
<parameter name="e" type="QP::QEvt const * const"/>
|
||||
<!--${QF::QF-dyn::q_new_ref::evtRef}-->
|
||||
<parameter name="evtRef" type="evtT_ const *&"/>
|
||||
<code>evtRef = static_cast<evtT_ const *>(QP::QF::newRef_(e, evtRef));</code>
|
||||
</operation>
|
||||
<!--${QF::QF-dyn::q_delete_ref}-->
|
||||
<operation name="q_delete_ref" type="template<class evtT_> void" visibility="0x00" properties="0x02">
|
||||
<!--${QF::QF-dyn::q_delete_ref::evtRef}-->
|
||||
<parameter name="evtRef" type="evtT_ const *&"/>
|
||||
<code>QP::QF::deleteRef_(evtRef);
|
||||
evtRef = nullptr;</code>
|
||||
</operation>
|
||||
</package>
|
||||
</package>
|
||||
<!--${QF-extern-C}-->
|
||||
@ -4395,8 +4449,7 @@ gc(evtRef); // recycle the referenced event
|
||||
<parameter name="evtT_" type="<event class>"/>
|
||||
<!--${QF-macros::Q_NEW::sig_}-->
|
||||
<parameter name="sig_" type="QP::QSignal"/>
|
||||
<code>(static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, (sig_))))</code>
|
||||
<code>(QP::QF::q_new<evtT_>((sig_)))</code>
|
||||
</operation>
|
||||
<!--${QF-macros::Q_NEW}-->
|
||||
<operation name="Q_NEW?def QEVT_DYN_CTOR" type="void" visibility="0x03" properties="0x00">
|
||||
@ -4406,8 +4459,7 @@ gc(evtRef); // recycle the referenced event
|
||||
<parameter name="sig_" type="QP::QSignal"/>
|
||||
<!--${QF-macros::Q_NEW::...}-->
|
||||
<parameter name="..." type="__VA_ARGS__"/>
|
||||
<code>( static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), QP::QF::NO_MARGIN, (sig_)))->ctor(__VA_ARGS__))</code>
|
||||
<code>(QP::QF::q_new<evtT_>((sig_), __VA_ARGS__))</code>
|
||||
</operation>
|
||||
<!--${QF-macros::Q_NEW_X}-->
|
||||
<operation name="Q_NEW_X?ndef QEVT_DYN_CTOR" type="void" visibility="0x03" properties="0x00">
|
||||
@ -4417,8 +4469,7 @@ gc(evtRef); // recycle the referenced event
|
||||
<parameter name="margin_" type="std::uint16_t"/>
|
||||
<!--${QF-macros::Q_NEW_X::sig_}-->
|
||||
<parameter name="sig_" type="QP::QSignal"/>
|
||||
<code>(static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), (margin_), (sig_))))</code>
|
||||
<code>(QP::QF::q_new_x<evtT_>((margin_), (sig_)))</code>
|
||||
</operation>
|
||||
<!--${QF-macros::Q_NEW_X}-->
|
||||
<operation name="Q_NEW_X?def QEVT_DYN_CTOR" type="void" visibility="0x03" properties="0x00">
|
||||
@ -4430,8 +4481,7 @@ gc(evtRef); // recycle the referenced event
|
||||
<parameter name="sig_" type="QP::QSignal"/>
|
||||
<!--${QF-macros::Q_NEW_X::...}-->
|
||||
<parameter name="..." type="__VA_ARGS__"/>
|
||||
<code>( static_cast<evtT_ *>( \
|
||||
QP::QF::newX_(sizeof(evtT_), (margin_), (sig_)))->ctor(__VA_ARGS__))</code>
|
||||
<code>(QP::QF::q_new_x<evtT_>((margin_), (sig_), __VA_ARGS__))</code>
|
||||
</operation>
|
||||
<!--${QF-macros::Q_NEW_REF}-->
|
||||
<operation name="Q_NEW_REF" type="void" visibility="0x03" properties="0x00">
|
||||
@ -4439,8 +4489,7 @@ gc(evtRef); // recycle the referenced event
|
||||
<parameter name="evtRef_" type="<event class>"/>
|
||||
<!--${QF-macros::Q_NEW_REF::evtT_}-->
|
||||
<parameter name="evtT_" type="<event class>"/>
|
||||
<code>\
|
||||
((evtRef_) = static_cast<evtT_ const *>(QP::QF::newRef_(e, (evtRef_))))</code>
|
||||
<code>(QP::QF::q_new_ref<evtT_>(e, (evtRef_)))</code>
|
||||
</operation>
|
||||
<!--${QF-macros::Q_DELETE_REF}-->
|
||||
<operation name="Q_DELETE_REF" type="void" visibility="0x03" properties="0x00">
|
||||
@ -4448,7 +4497,7 @@ gc(evtRef); // recycle the referenced event
|
||||
<parameter name="evtRef_" type="<event class>"/>
|
||||
<code>do { \
|
||||
QP::QF::deleteRef_((evtRef_)); \
|
||||
(evtRef_) = 0U; \
|
||||
(evtRef_) = nullptr; \
|
||||
} while (false)</code>
|
||||
</operation>
|
||||
<!--${QF-macros::PUBLISH}-->
|
||||
@ -8455,7 +8504,7 @@ if (QS_GLB_CHECK_(rec_) && QS_LOC_CHECK_(qsId_)) { \
|
||||
#define QP_HPP_
|
||||
|
||||
//============================================================================
|
||||
#define QP_VERSION_STR "7.3.5-rc.1"
|
||||
#define QP_VERSION_STR "7.3.5-rc.2"
|
||||
#define QP_VERSION 735U
|
||||
#define QP_RELEASE 0x70A1DEF0U
|
||||
|
||||
|
@ -70,9 +70,8 @@ namespace QP {
|
||||
|
||||
//${QEP::QEvt::ctor} .........................................................
|
||||
#ifdef QEVT_DYN_CTOR
|
||||
QEvt * QEvt::ctor(DynEvt const dummy) noexcept {
|
||||
void QEvt::ctor(DynEvt const dummy) noexcept {
|
||||
Q_UNUSED_PAR(dummy);
|
||||
return this;
|
||||
}
|
||||
|
||||
#endif // def QEVT_DYN_CTOR
|
||||
|
Loading…
x
Reference in New Issue
Block a user