macros


Subject: macros
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Fri Apr 13 2001 - 00:06:00 CDT


I've had a minute or two to think about how to implement macros, and here is
a *very* rough draft of what I came up with. It was literally scribbled onto
a napkin during dinner.

I have also given some thought as to implement macros giving 0 overhead in
the default case (i.e. not editing a macro) -

I've spent quite some time in ev_editmethod land in the past. Just FYI, all
of our functions are keyed by strings, and accessed through a hashtable or
bsearched for in an array. In any case, there is one entry point to map the
name onto the EV_EditMethod_Fn. Now what we don't want to do is:

if (m_pDoc->isEditingAMacro())
...

What I'm thinking about is a using a function pointer that gets set by calls
to maybe beginMacro() and endMacro(). We call into this pointer, and it
takes us to one of two implementations:

1) The current (default) one
2) The one that adds the method name and data to an existing macro, and then
calls #1

Pretty simple, eh?
Dom
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com




This archive was generated by hypermail 2b25 : Fri Apr 13 2001 - 00:06:04 CDT