Hi Mira: >From mira@ccs.neu.edu Wed Nov 19 19:43:57 1997 > >> >> Hi Mira: >> >> we can compose adjusters in two ways: by using the modifies >> relationship between them and by giving several adjusters to the >> same strategy. What is the relationship between the two compositions? > >In the first case both adjusters are not independent from >each other: they exist as parts of the same "higher-level" >modification. The change methods in both adjusters will >be renamed by the generator with the same name. The super >parameter in the implementation of the modifier adjuster >is the corresponding implementation in the modifiee >adjuster. For example, when summing is modified >by initial and the later by checking for realizing >the capacity checking functionality, all change >methods will be renamed uniformely to >check-capacity (or something like that) and they will >be incremental modifications of each other. > Matches my understanding. > >On the contrary, in the second case, both adjusters are >independent from each other. I think, their "changes" That not match my understanding, see below. >will be renamed differently. For examle, we could attach >pricing and inventory to the same strategy on a computer >object structure. Their corresponding >changes will be renamed to e.g. equipment-pricing and >equipment-inventory respectively. > >> If we give two adjusters as arguments to the same strategy, how can the >> two adjusters communicate. Cane we add further communication after the >> adjusters have been written (a la Java beans)? >> >> -- Karl > >What do you mean by communication between adjusters? Do you have >a particular sample scenario in mind? Let's assume we have a PrintVisitor generated by Demeter/Java but we want to use it on a circular object. Therefore, we write an OnlyOnce visitor and write: A{ printit() do S (OnlyOnce,PrintVisitor); } The OnlyOnce visitor will contain around methods which make sure that each object is visited only once. OnlyOnce controls PrintVisitor; they are not independent. -- Karl > >-- Mira > >