Download Bouml user manual - Fedora Project Packages GIT repositories
Transcript
file:///E:/uml/BOUML/bouml_4.2/doc/TOUT.html
#include <string>
using namespace std;
If you don't want to use the namespace and ask to write std::string the declaration must be :
std::${name}
#include <string>
Operation
The C++ definition of an operation is set through the Uml and C++ tabs of the operation dialog.
The indentation of the first line of the declaration/definition give the indentation added to the visibility specification in the cla
definition for all the operation declaration/definition (except for the pre-processor forms beginning by # whose are placed at
beginning of the line).
In BOUML the generated code is obtained by the substitution of macros in a text, the macros known by the C++ code generator are :
306 of 378
${comment} is replaced by the description of the operation adding //
${description} is replaced by the operation description without adding //
${static} produce static when the operation is a class operation (see the UML tab)
${const} produce const when the operation is const
${volatile} produce volatile when the operation is volatile
${friend} produce friend when the operation is friend
${virtual} produce virtual when the oprration is virtual
${inline} produce inline when the operation is inline
${type} is replaced by the returned value type (see the UML tab)
${name} is replaced by the operation's name
${class} is replaced by the name of the class containing the operation.
${(} and ${)} produce ( and ), but there are also a mark for BOUML to find the parameters list
${abstract} produce the string = 0 when the operation is abstract (see the UML tab)
${staticnl} produce a line break when the operation is static, else an empty string.
${t<n>}
and
${p<n>}
produce the type and the name of each parameter (count from 0), this allows you to remove a parameter, add type modifiers etc
...
${throw} is replaced by the form throw (...) when at least an exception is defined in the UML tab. It is also possible to produce
throw() when there is no exception depending on the generation settings.
${body}
is replaced by the body of the operation, this macro may also be replaced by the body itself (BOUML use this way for the get
and set operations associated to a relation/attribute). The usage of ${body} has a great advantage : when you hit Default
definition
or
From
declaration
the body is not cleared ! At least BOUML share the declaration and definition forms of the operations (and other object
minimize the needed memory size, ${body} help for this ! The indentation of the keyword ${body} is added at the beginning of
each line except the ones starting by a '#' or when the previous one ends by '\'.
@{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 ...
A
template
operation
is defined with an empty declaration (allowing Bouml to detect this case) and placing the actuals between ${class} and :: in the
declaration part.
17/02/2008 11:43