Hi David,

> Why not just this?
> %attribute(Class, Type, Name, get ## Name, set ## Name);

Yes indeed.

> Boost solved this problem as follows:
>
> #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
> #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
> #define BOOST_DO_JOIN2( X, Y ) X##Y
>
> if you use those, try
>
> %define %autoAttribute(Class, Type, Name)
> %attribute(Class, Type, Name, BOOST_JOIN(AGETTER, Name), BOOST_JOIN(ASETTER, Name));
> %enddef
 
Thanks you, it is now working like a charm.
 
Greg.

 


Votre correspondant a choisi Hotmail et profite d'un stockage quasiment illimité. Créez un compte Hotmail gratuitement !