Re: Complexity of new hardware
"Will Vale" <[email protected]>
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Organization | Second Intention Limited |
| Message-ID | <op.usl31oqo6q9wgg@pimmetje> |
On Sun, 19 Apr 2009 03:03:27 +1200, Jarkko Lempiainen <[email protected]> wrote: > All I have is something like: >struct foo > { PFC_MONO(foo) {PFC_VAR3(x, y, z);} > int x, y, z; > }; That's admirably brief! I assume you're generating code rather than data though - which tends to be more verbose, or at least it does for me. One trick I found helpful to avoid identifier repetition was to move some commas inside macros, to avoid having to specify the parent name twice in IMPLEMENT_BEGIN/IMPLEMENT_END and still avoid explict arity: // rtti.h - detail elided #define COMPOUND(name) static const member_t members[]; #define RTTI(name, members) const member_t name::members[] = { members { NULL, ... } }; #define MEMBER(name) { #name, ... }, // foo.h struct foo { COMPOUND(foo) int x, y, z; }; // foo.cpp - essentially generates const member_t foo::members[] = { ... }; RTTI(foo, MEMBER(x) MEMBER(y) MEMBER(z)) Cheers, Will ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ GDAlgorithms-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list