Boost logo

Boost Users :

From: Hicham Mouline (hicham_at_[hidden])
Date: 2008-08-27 05:39:35


Hello,

i have 2 choices:

1) runtime

   class BaseD
class D1 .... D200 derived from BaseD (all of them singletons,
don't really store any data in them, they just provide policy)

and class C1... C100 (also all derived from BaseC)
for each Cxxx, there is a perferred D to deal with it, but "some" other Ds work also...
the library user creates instances of Cxxx,
I could then have a global runtime std::map<BaseC&, BaseD&>, that stores singletons of Cxxx,
and preferred Dxxx

2) compiletime
or i could store this mpl::map<> to associate each type Cxxx with its favorite Dxxx
i suppose i could construct this by extending in each header file (for each Cxxx),
the mpl::map with the Cxxx and its associated Dxxx

Any comments are appreciated re this choice,
for e.g. the max number of elts for map<>

regards,


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