13.07.2015 Views

Bouml reference manual - Fedora Project Packages GIT repositories

Bouml reference manual - Fedora Project Packages GIT repositories

Bouml reference manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

file:///C:/uml/BOUML/bouml_3.0/doc/TOUT.html72 of 378 07/10/2007 15:55aggregation by value: to define a bi-directional composition, the code generators will produce two attributes whose names are the roles's name. Thiskind of relation may considered to be a shortcut to define two (directional) aggregations by value.By default, the example above produce the following codes (the visibility may be replaced by var to be compatible with Php 4) :C++ Java Php Idlclass C : public C3 {protected:C * dir_a;C * dir_b;C2 * theC2;};class C extends C3 {protected C dir_a;protected C dir_b;protected C2 theC2;}class C extends C3 {protected $dir_a;protected $dir_b;protected $theC2;}valuetype C : C3 {private C dir_a;private C dir_b;private C2 theC2;};class C2 {protected:C * theC;C2 a;friend class C3;};class C2 {protected C theC;protected C2 a;}class C2 {protected $theC;protected $a;}valuetype C2 {private C theC;private C2 a;};The multiplicity and stereotype may be used to produce the appropriate code with a natural and intuitive way. For instance the C's relationtheC2 with the stereotype vector and multiplicity * will produce (depending on the generation settings) :C++ Java Idlvector theC2; protected Vector theC2; private sequence theC2;With the stereotype vector and the multiplicity 12, the C's relation theC2 will produce (depending on the generation settings) :C++ Java IdlC2 * theC2[12]; protected C2[] theC2; private sequence theC2;Refer to the C++ Generator, Java generator, Php Generator and Idl generator for additional information.MenusThe relation menu appearing with a right mouse click on its representation in the browser is something like these, supposing it is notread-only nor deleted (see also menu in a diagram) :

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!