[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kuml-devel
Subject:    Re: Auto generator
From:       zmower () btinternet ! com
Date:       2000-11-06 21:08:32
[Download RAW message or body]



I wrote:

<snip>
 
> However, the code generated doesn't implement associations properly.
> E.g. consider the composition of Classifier and Feature:
> 
> A Classifier is composed of many Features.
> A Feature may be owned by a Classifer.
> 
> Feature has methods to set/unset/return the owning Classifier.
> Classifier has methods to add/modify/remove Features.
> 
> Currently my implementation of the methods only affects the class its
> applied to
> e.g.  calling set_owner on a Feature only sets the Feature's private
> fc_owner
> attribute to the supplied parameter; it does *not* add the Feature to
> the set of
> Features held by the supplied owning Classifier.  :-(

Actually, this may be the correct implementation after all.  I think in
this example that the AOwnerFeature class's add method is the correct
way to create an association between a Classifier and a Feature.  This
method should call both set_owner and add_feature.

> So the 2nd iteration of the autogenerator will involve splitting the
> process up into a few stages.  Stage 1 will extract the association
> information from Foundation_impl.h and save it to a file.  Stage 2
> involve manually editing this file to indicate which association ends
> are composites.  I can't see any way to derive this information
> automatically so its a scan the Syntax Diagrams and alter the file
> exercise.  Stage 3 is an enhanced code generation.

Stage 1 is probably overkill now.  I'll just have a list of composite
Classes/roles.

Chris Moore

--
Sig pending!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic