Boost logo

Boost Users :

From: Paul Mensonides (yg-boost-users_at_[hidden])
Date: 2002-12-06 15:12:16


"midnight2silverlake" <midnight2silverlake_at_[hidden]> wrote in message
news:asq7h1+r192_at_eGroups.com...
> I have what looks like a perfect application for Boost/Preprocessor.
> I have 192 entries in a Factory Map a portion of which are show
> below. I'd like to generate the permutations of the three macro
> inputs, but can't figure out where to start. Any help would be
> appreciated.
>
> #define MAP_ENTRY_MCR( aLang, aType, aAcc ) \
> \
> mMap[ CKey( aLang, aType, aAcc ) ] \
> = CVarX< aLang, aType, aAcc >::Make;
>
> MAP_ENTRY_MCR( DCTlanguageC, DCT_DOUBLE , DCT_NONE );
> MAP_ENTRY_MCR( DCTlanguageC, DCT_DOUBLE , DCT_INIT );
> MAP_ENTRY_MCR( DCTlanguageC, DCT_DOUBLE , DCT_ANYTIME );
>
> MAP_ENTRY_MCR( DCTlanguageC, DCT_FLOAT , DCT_NONE );
> ...
>
> Thanks, Jeff Flinn

Hi Jeff,

I want to make certain that I'm clear about what you're trying to do. You
have 192 consecutive "MAP_ENTRY_MCR( ... )" with different permutions each
time, right? How many different elements for each "field" do you have?
(i.e. how many DCT_DOUBLE, DCT_FLOAT, etc. and how many DCT_NONE, DCT_INIT,
etc.)

There are several ways to do this, so let me know if I'm clear on what
you're doing, and I'll help you.

Paul Mensonides


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net