← Back to team overview

kicad-developers team mailing list archive

Re: Kicad Tool Framework

 

On 08/12/2013 05:41 PM, Lorenzo Marcantonio wrote:
On Mon, Aug 12, 2013 at 10:58:31AM +0200, Tomasz Wlostowski wrote:
Thanks :) I didn't want to impose any particular way of writing
these FSMs, every programmers has his/her own taste, so he's free to
choose between coroutines, state-as-method or simply a switch(state)
{}.

Do you know a good way for coroutines in C/C++? i.e. no setjmp/longjmp
ugliness...
Initially, I though about using boost::coroutine, but almost got scared to death after seeing the example code. Finally I used boost::context + a small wrapper class.

In kicad-gal-orson, there is a small example in include/tool/examples/coroutine_example.cpp.

Regards,
Tom


Follow ups

References