On Jul 5, 10:10 am, "Edward K. Ream" <[email protected]> wrote: > On Sun, Jul 5, 2009 at 9:53 AM, Ville M. Vainio <[email protected]> wrote:
> > However, I still think most of the methods in position could be in > > node as well (i.e. they are operations that apply equally well to any > > cloned version). Just to illustrate the issue, some examples: > > Again, the present code is a pretty good guide. Many position methods > delegate significant work to vnode methods. It is looking like very few changes will be needed to make the one- node scheme work: - Change p.clone so it doesn't creates a new vnode, but simply increments its refCount. - Replace the v.tnodeList ivar with a v.refCount ivar. - Replace v._computeParentsOfChildren with two new methods, p.incrRefCount and p.decrRefCount. I *think* these methods are straightforward, but we shall see. The data integrity of the one-node world depends on the correctness of p.incr/decrRefCount. - Modify only p.Low Level Methods and v.Low Level Methods. Most of the changes will just replace v._computeParentsOfChildren with p.incrRefCount or p.decrRefCount. In particular, the all-important p.moveToX methods should remain unchanged. Of course, other minor changes will be needed. For instance, for compatibility tnode iterators will be synonyms for vnode iterators. Etc. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
