I've created a generator for Python. It still misses some functionality 
as I don't have an approach for the Zframe and Zmsg types.

However one thing I didn't find out how to do with gsl is the 
following:

In Python there's no switch construct. So instead you're supposed to 
use if, elif, else.
However how do I tell gsl to only do "if" for the first element and 
then continue with "elif"?

For example the if at:
https://github.com/sphaero/zproto/blob/python_gen/src/python/zproto/ZprotoExample.py#L250

Then the next if:
https://github.com/sphaero/zproto/blob/python_gen/src/python/zproto/ZprotoExample.py#L262

should be an "elif"

The gsl code looks like this:

.for class.message where count (field)
         if self._id == $(ClassName).$(MESSAGE.NAME):
.   for field
.       if type = "number"
             #  $(name) is a $(size)-byte integer
.           if defined (field.value)
             self._put_number$(size)($(value:))
.           else
             self._put_number$(size)(self._$(name))
.           endif
.......
.   endfor
.endfor


Any suggestions?

Rg,

Arnaud
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to