qpcpp/doxygen/snippets/qep_qmsm.cpp
MMS 34cdcc7929 7.0.0rc1
major release 7.0.0 release candidate 1
2022-04-19 19:23:30 -04:00

25 lines
622 B
C++

class Calc : public QP::QMsm { // inherits QP::QMsm
private:
double m_operand;
char m_display[DISP_WIDTH + 1];
std::uint8_t m_len;
std::uint8_t m_opKey;
public:
Calc() // constructor
: QMsm(&initial)) { // superclass' constructor
}
protected:
// NOTE: QMsm state machine code is not intended for manual
// coding but rather needs to be generated automatically by
// the QM modeling tool
QM_STATE_DECL(initial);
QM_STATE_DECL(on);
QM_ACTION_DECL(on_e);
QM_STATE_DECL(ready);
QM_STATE_DECL(result);
QM_STATE_DECL(begin);
. . .
};