On Fri, Sep 21, 2007 at 11:59:56AM +0200, Georg Baum wrote: > Richard Heck wrote: > > > The change should be fairly simple, both in the code and in lyx2lyx: > > It's mostly a matter of file format, not so much of internal > > representation. Internal code concerned with writing and reading will be > > all that changes. This will significantly simplify factory.cpp's > > readInset() routine. > > Only slightly: A few lines of hardcoded ref commands would vanish. > > > In particular, things like this: > > // This strange command allows LyX to recognize "natbib" style > > // citations: citet, citep, Citet etc. > > // FIXME: We already have partial support for \\fullcite and > > // the various \\footcite commands. We should increase the > > // file format number and read these commands here, too. > > // Then we should use is_possible_cite_command() in > > // InsetCitation to test for valid cite commands. > > if (compare_ascii_no_case(cmdName.substr(0,4), "cite") == 0) { > > inset.reset(new InsetCitation(inscmd)); > > } else... > > go away. > > That is a separate issue that can be solved independently. Having said that, > the proposed change InsetCommand->InsetCitation makes much sense, but not > because of the factory.cpp simplification (it would still need two lines > per inset which is OK IMHO), but because of the added flexibility. > > The bad news is that this change will require one controller class for each > inset. Currently there is only one command controller, used by all command > insets. That is the only reason I did not do this change already during the > InsetCommandParams rewrite.
So again an instance where out version of MVC separation hampers development? Andre'