[mythtv] Looking to commit code...

George Nassas gnassas at mac.com
Thu Mar 8 05:24:05 UTC 2012


On 2012-03-06, at 5:00 PM, David Blain wrote:

> I looked into two options:
> 
> 1) Make duplicate enums in the Service/Data Contract classes (too likely to
> get out of sync).
> 2) Move enums to Service/Data Contract classes.  (This would need a large
> refactoring of the current code base... not something I was willing to take
> on at this point)
> 
> If you can find a solution to this, I'd be more than happy to review/commit
> the patch.

I agree about the shortcomings so I started wondering about exploring either of two notions:

- defining enums through some kind of funky dual-purpose macros that can do the definition and create serializer structures based on context
- parsing header files and generating text/value arrays as output

and before I had to do any further thinking I found a page (http://stackoverflow.com/questions/201593) at the most helpful site on the web.

I like the gccxml approach since it's non-invasive and it's easy to add new enums once some generic xsl is written.

Probably the main question is how do people feel about adding a new build dependancy? I'm sure gccxml is packaged for all the linux distros & BSD but I'm not sure about Mac and Windows. On the other hand I notice the MacPorts port file doesn't show any dependencies so maybe it's a painless thing to add.

- George


More information about the mythtv-dev mailing list