On Tue, Mar 20, 2007 at 10:24:52AM +0100, Jean-Marc Lasgouttes wrote: > >>>>> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > >>>>> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > Jean-Marc> The idea is to replace it with a std::set<string> and > Jean-Marc> change LyXTextClass::provides() accordingly. The rest is > Jean-Marc> purely mechanical (replace enum by string). It could be > Jean-Marc> possible to simplify further the code, but it is not needed > Jean-Marc> now (and may be more dangerous) > > Jean-Marc> This is how the basic (untested patch would look like). > Jean-Marc> layout2layout support is still missing of course (so that > Jean-Marc> this patch is useless as is). This trivial patch only works > Jean-Marc> for the features that could already be provided earlier. > Jean-Marc> Adding a "Provides graphics" will have no effect, for > Jean-Marc> example. It is tempting to redefine isRequired() to return > Jean-Marc> false when provides returns true, but we have to be a bit > Jean-Marc> more careful than that. > > Jean-Marc> One solution would be to define a isNeeded() for this use > Jean-Marc> case, and still use isRequired in the few cases where this > Jean-Marc> makes sense. > > I forgot to add that I do not know how std::set works, so my code > could be bogus (but at least it compiles :).
>From what I remember it is valid... - Martin
