Class Attribute Initializer
Real-Time Event Frameworks based on active objects & state machines
Brought to you by:
quantum-leaps
Hi,
Currently, QM only supports adding initializer for Free Attribute. Given that C++ allows member initialization, I would like to have the option to do that in the tool itself.
class BLE : public QP::QActive {
private:
std::uint8_t m_timeout{0};
public:
BLE();
protected:
Q_STATE_DECL(initial);
Q_STATE_DECL(off);
Q_STATE_DECL(on);
};
As you can see the initialization of private member m_timeout could be generated in the tool.
Thanks,
Aleksa
Anonymous
Makes sense. The initializer filed will be added to the class attributes as well. The "initialzier" filed will be disabled (glayed out) in C, i.e., models based on qpc or qpn.
This feature request is accepted into the next QM release.
--MMS
Implemented in QM 5.0.1.
--MMS