mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-02-04 06:13:00 +08:00
34cdcc7929
major release 7.0.0 release candidate 1
23 lines
481 B
C++
23 lines
481 B
C++
class Calc : public QP::QHsm { // inherits QP::QHsm
|
|
private:
|
|
double m_operand1;
|
|
double m_operand2;
|
|
char m_display[DISP_WIDTH + 1];
|
|
std::uint8_t m_len;
|
|
std::uint8_t m_opKey;
|
|
|
|
public:
|
|
Calc() // constructor
|
|
: QP::QHsm(Calc)) { // superclass' constructor
|
|
}
|
|
|
|
protected:
|
|
Q_STATE_DECL(initial);
|
|
Q_STATE_DECL(on);
|
|
Q_STATE_DECL(error);
|
|
Q_STATE_DECL(ready);
|
|
Q_STATE_DECL(result);
|
|
Q_STATE_DECL(begin);
|
|
. . .
|
|
};
|