qpcpp/doxygen/snippets/qep_qmsm.cpp

25 lines
622 B
C++
Raw Normal View History

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