|Easy way to create Method of an Operation? [message #1137434]
||Mon, 14 October 2013 09:40
| Joost Kraaijeveld
Registered: July 2009
I am investigating the possibility of C++ code generation. One possible
way to do that, is to give the user the possibility of creating a
"Method" (which is of "Behavior" type) for an "Operation". Most of the
time the "Method" would be the same as the Operation, i.e. same name,
parameters, pre/post-conditions etc, but with an implementation body.
The current procedure is rather tedious: I need to create a new
"Method", fill in all the blanks with the same values as the "Operation"
has but still cannot enter (source) code.
I noticed that if I use State Diagrams I can specify an "Effect" (which
is also of "Behavior" type, just as "Method") , for which I can choose
amongst things "FunctionBehavior" which allows for coding the body of
the FunctionBehavior in C, C++, Java, Natural Language or OCL.
Hence several questions:
1. As far as I can find, the 'Method" and "Effect" are both just
"Behaviour" according to the UML 2.4.1. Is that correct?
2. Is there an easy copy paste action available in Papyrus?
3. Can I somehow enter code for my method?
Powered by FUDForum
. Page generated in 0.01872 seconds