qpcpp/doxygen/snippets/qep_qhsm.cpp

22 lines
659 B
C++
Raw Normal View History

2013-10-10 20:01:51 -04:00
class QCalc : public QHsm { // derived from QHsm
2012-08-14 18:00:48 -04:00
private:
double m_operand1;
double m_operand2;
char m_display[DISP_WIDTH + 1];
uint8_t m_len;
uint8_t m_opKey;
public:
2013-10-10 20:01:51 -04:00
QCalc() : QHsm(Q_STATE_CAST(&QCalc::initial)) { // ctor
2012-08-14 18:00:48 -04:00
}
protected:
2013-10-10 20:01:51 -04:00
static QState initial (QCalc * const me, QEvt const *e);
static QState on (QCalc * const me, QEvt const *e);
static QState error (QCalc * const me, QEvt const *e);
static QState ready (QCalc * const me, QEvt const *e);
static QState result (QCalc * const me, QEvt const *e);
static QState begin (QCalc * const me, QEvt const *e);
. . .
2012-08-14 18:00:48 -04:00
};