[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: context hierachy
From: |
Han-Wen Nienhuys |
Subject: |
Re: context hierachy |
Date: |
Thu, 14 Mar 2002 21:26:39 +0100 |
address@hidden writes:
> > origin_trans_l
> > will give you the path of the translators, i.e. Engraver, Thread,
> > Voice, Staff (if this == Staff)
>
> Okay, traverse upwards with daddy_trans_l until I reach the Staff, I see.
> My question was more like: How do I know when I reach the staff? I.e. Will
> the
> following (untested) code be too slow - testing aliasses on all levels? It
> has
> to be done for each and every accidental...
Don't worry about speed for now. Correctness is much more important.
If it still worries you, probably the best way is to travel upwards
until you reach the this pointer (or, in case you're at pianostaff
level, and want to know the staffs), until origin_trans->daddy ==
this.
--
Han-Wen Nienhuys | address@hidden | http://www.cs.uu.nl/~hanwen/