Attached is a "outline source" of a new proposed re-working of the lyxfunc
and lyxaction code. It is obviously incomplete but serves to indicate
where I'm heading.

o no longer is the various parts of a new function spread in four or five
  different places. To add a new function means adding it to functions.C,
  and (if necessary) a status tester to status_functions.C

o several files are auto-generated with a perl script. This helps
  centralise the details of each lyxfunc

o each lyxfunc has doxygen-style commentary (which is also interpreted to
  generate the automatic files)

o lyxaction is gone, replaced with lf_container, which is a little more
  container-y, and contains no special code for handling the functions (it
  is basically a look-up facility)

o each lyxfunction handles itself, include pseudo-action functions

o there's no extra expensive lookup for static functions on dispatch

I would appreciate any comments anyone has got. Is this workable or am I
crazy ? How do people feel about auto-generating files ?

thanks
john

-- 
"Threads are for people who can't program state machines."
        - Alan Cox

lyxfunc.tar.gz

Reply via email to