I have the following in my state machine definition file:
interface:
var App: pointer<VM>
The documentation states that I need to add 'import: "vm_app.h"' to the definition file for it to generate the correct C++ code. This doesn't quite work because my VM object also needs a handle to the state machine itself which results in a circular inclusion. I use the single inclusion pattern (#ifndef FILE_H...) so one of them always fails. The correct pattern would be a forward declaration in the header file, and the header inclusion in the implementation file. For now, I have to manually add the forward class declaration to the generated header file and manually add the '#include "vm_app.h"' line to the generated .cpp file.
Is there a better way to do this?