You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Kevin Barrett <ke...@baymicrosystems.com> on 2009/05/27 22:41:56 UTC

Re: Autogenerating conversion code

Working on a project that extends an embedded device API using Thrift.
Server is C++, and clients are Python and Java (so far).  The API uses
nested structs to collect data for the various components of the system.
To maintain its integrity, the API is prohibited from using Thrift
structures itself; so my service methods are having to stuff and unstuff
the Thrift structs as they depart and arrive.  This results in an awful
lot of "local.elementX = remote.elementX; local.elementY =
(localEnumY)remote.elementY;" code, times two for each direction.

Right now we are doing this by hand, which is a coding and maintenance
headache.  One option is to parse the IDL (or even the API source) and
autogenerate this code.  Is anybody doing this?


Kevin Barrett
kevin@baymicrosystems.com
Germantown, MD, USA