| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| fsmc-template-2.0.0.zip | 2018-02-15 | 62.0 kB | |
| Readme.mdown | 2018-02-15 | 1.2 kB | |
| fsme-2.0.0.dmg | 2018-02-15 | 10.2 MB | |
| fsme-windows-2.0.0.zip | 2018-02-15 | 19.5 MB | |
| Totals: 4 Items | 29.8 MB | 7 | |
This is a new major release, depending on Qt 5.x. Except of new look and feel, new templates have been added to template generator system. Generate Java Script, Scala, Objective C and Swift code from single FSM file. To use it, unpack fsmc-template-1.0.5.zip and issue the following command:
python mkfsm.py -t fsmheader.mako -o SampleFSM.h SampleFSM.fsm
Replace that Sample.fsm with your FSM name and you will get a header file. Then issue the following command:
python mkfsm.py -t fsmbody.mako -o SampleFSM.cpp SampleFSM.fsm
and you will get an implementation of your FSM in SampleFSM.cpp. In your code, you will need to do the following:
class YourClass : public SampleFSM::Delegate {
SampleFSM fsm;
public:
// you will need to override inputs and outputs here
bool sampleInput() const;
void sampleOutput();
};
And in the implementation you will need to initialize FSM in a constructor:
YourClass::YourClass()
: fsm(this) {}
After that, you can issue events to your FSM:
void YourClass::someMethod()
{
fsm.processEvent(SampleFSM::SampleEvent, QVariantMap());
}
Please feel free to add your own templates according to your needs. With this template-based generator, all generation restrictions are gone.