ArchgenXML with ArgoUML - text fields not working, and an ATBackRef question
chris
chris at protaform.com
Wed Jul 18 08:19:20 UTC 2007
Hello Encolpe,
Sorry about the delay.
You can get Sane bi-directional references by setting up the UML like
this:-
----------- -----------
| Class-A | | Class-B |
----------- BR R -----------
| |------------------------------| |
----------- link -----------
| | | |
----------- -----------
Where:
Class-A and Class-B are your Product's classes.
link is a named directionless association
R and BR are the named association ends.
Note, 'link' need not be named (it would automagically be named 'R-BR'
if no name is supplied - I just prefer to be explicit as I think it
makes matching the resulting code to the original UML easier). However,
it _must_ be directionless. I'm pretty sure weird things happen if the
association has a direction.
Also note, 'R' will be the Reference field defined in, and displayed on
the Class-A object. BR will become a BackReference field in Class-B.
To complete the UML, add a tagged value to 'BR' of:
mode:'r'
The 'mode' tagged value is not listed in the ArchGenXML getting started
guide, but it is a valid schema parameter, and ArchGenXML will pass it
through to the code correctly.
To generate the product, run ArcheGenXML with the
--backrefernces-support=YES switch.
After much testing I do not believe it is possible to have a reference
that can be set/managed from either end - you must choose one 'master'
class where the link is controlled from.
Hope this helps,
Chris.
On Fri, 2007-07-13 at 15:16 +0200, Encolpe Degoute wrote:
> chris a écrit :
> > Hi,
> >
> > Solution to your Backref problem: make the Backref readonly. (I can
> > send you a trivial example if you want - just let me know).
> > End result: bi-directional links that can only be set from one side.
>
> Hello,
> Can you send me this example. I was searching how to do that last week
> and finally abandoned.
>
> Regards,
More information about the Product-Developers
mailing list