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.html327 of 378 07/10/2007 15:55${items} produces the enumeration items of an enum. other members are not produced@{xyz} is replaced by the user property value in case xyz is the key of this property. The property if searched first for the class, ifnot found for the container of the class (an other class of a class view) etc ...In the special case where the class is declared external, its Php type declaration must contains a line indicating how the name of the classis generated, by default ${name} meaning that the name is produced unchanged, the only allowed keywords are ${name}, ${Name} and${NAME}.OperationThe Php definition of an operation is set through the Uml and Php tabs of the operation dialog.The indentation of the first line of the declaration/definition give the indentation added to the class definition for all the operationdefinition.In BOUML the generated code is obtained by the substitution of macros in a text, the macros known by the Php code generator are :Notes :${comment} is replaced by the description of the operation adding /* */${description} is replaced by the operation description without adding /* */${visibility} produce the visibility (see the UML tab), except if the visibility is package (use this case to produce Php4 code)${static} produce static when the operation is a class operation (see the UML tab)${final} produce an empty string when the check box final is not checked, else produce final${abstract} produce abstract when the operation is abstract (see the UML tab)${name} is replaced by the name of the operation.${(} and ${)} produce ( and ), but there are also a mark for BOUML to find the parameters list${t} and ${p}produce the type and the name of each parameter (count from 0), this allows you to remove a parameter, etc ...${staticnl} produce a line break when the operation is static, else an empty string. In case you do not like this notation, change thegeneration settings to remove this macro.${body} is replaced by the body of the operation, this macro may also be replaced by the body itself (BOUML use this way for theget and set operations associated to a relation/attribute). The usage of ${body} has a great advantage : when you hit Defaultdefinitionthe body is not cleared ! At least BOUML share the definition forms of the operations (and other objects) to minimize the nememory size, ${body} help for this ! The indentation of the keyword ${body} is added at the beginning of each line.@{xyz} is replaced by the user property value in case xyz is the key of this property. The property if searched first for the operation,if not found for the class containing the operation etc ...If the toggle preserve operations's body is set through the Languages menu,the generators do not modify the body of the operations protected by dedicated delimiters. This means that for them the boddefinition set through BOUML is not used. The first time you generate the code with the toggle set, because the delimiters are notyet present in the generated code, the operation's body will be updated depending on their definition under BOUML. After, whilethe toggle is set and the delimiters present, the bodies will not change, allowing you to modify them out of BOUML.In case the file containing a body definition is not consistent with the artifact under BOUML, the body will be regenerated by thcode generation, using its definition under the model.When you import a project, the body of the imported operations must be the right one in the imported model. The preserved bodiesof the imported operations will not be find because the identifier of an operation used to mark its body changes during the import.The bodies under the model are not updated by the code generation (a new plug-out must be made for that).Only the operations using the keyword ${body} may have a preserved body.

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

Saved successfully!

Ooh no, something went wrong!